[fe30c61] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | # $Id$
|
---|
| 4 |
|
---|
| 5 | #=== MAKEFILE HEADER ===
|
---|
| 6 |
|
---|
[195ed9f] | 7 | #----------------------------------#
|
---|
| 8 | wrt_Makefile_header() { #
|
---|
| 9 | #----------------------------------#
|
---|
| 10 | (
|
---|
| 11 | cat << EOF
|
---|
| 12 | # This file is automatically generated by jhalfs
|
---|
[fe30c61] | 13 | # DO NOT EDIT THIS FILE MANUALLY
|
---|
| 14 | #
|
---|
[195ed9f] | 15 | # Generated on `date "+%F %X %Z"`
|
---|
| 16 |
|
---|
[aec4483] | 17 |
|
---|
| 18 | SHELL = /bin/bash
|
---|
[195ed9f] | 19 |
|
---|
| 20 | SRC = /sources
|
---|
| 21 | MOUNT_PT = $BUILDDIR
|
---|
| 22 | PKG_LST = $PKG_LST
|
---|
| 23 | LUSER = $LUSER
|
---|
| 24 | LGROUP = $LGROUP
|
---|
[962793a] | 25 | LHOME = $LHOME
|
---|
[195ed9f] | 26 | SCRIPT_ROOT = $SCRIPT_ROOT
|
---|
| 27 |
|
---|
| 28 | BASEDIR = \$(MOUNT_PT)
|
---|
| 29 | SRCSDIR = \$(BASEDIR)/sources
|
---|
| 30 | CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
|
---|
[93346ee] | 31 | LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$LOGDIRBASE
|
---|
| 32 | TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
|
---|
[195ed9f] | 33 |
|
---|
| 34 | crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands
|
---|
[93346ee] | 35 | crLOGDIR = /\$(SCRIPT_ROOT)/$LOGDIRBASE
|
---|
| 36 | crTESTLOGDIR = /\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
|
---|
| 37 | crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE
|
---|
[195ed9f] | 38 |
|
---|
[ef32ce5] | 39 | SU_LUSER = sudo -u \$(LUSER) -i sh -c
|
---|
[962793a] | 40 | LUSER_HOME = \$(LHOME)/\$(LUSER)
|
---|
[195ed9f] | 41 | PRT_DU = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
|
---|
| 42 | PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
|
---|
| 43 |
|
---|
[3e7ceed] | 44 | ADD_REPORT = $REPORT
|
---|
| 45 | ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
|
---|
| 46 | ADD_BLFS_TOOLS = $BLFS_TOOL
|
---|
[7072e1f] | 47 | PKGMNGT = $PKGMNGT
|
---|
[1838bc7] | 48 |
|
---|
| 49 |
|
---|
[195ed9f] | 50 | export PATH := \${PATH}:/usr/sbin
|
---|
| 51 |
|
---|
| 52 | include makefile-functions
|
---|
| 53 |
|
---|
| 54 | EOF
|
---|
| 55 | ) > $MKFILE
|
---|
| 56 | }
|
---|
[fe30c61] | 57 |
|
---|
| 58 | #=======================
|
---|
| 59 |
|
---|
| 60 |
|
---|
[3cb4ef5b] | 61 | #==== PACKAGES NAMES AND VERSIONS ====
|
---|
[fe30c61] | 62 |
|
---|
| 63 | #----------------------------------#
|
---|
| 64 | get_package_tarball_name() { #
|
---|
| 65 | #----------------------------------#
|
---|
[659be15] | 66 | local script_name=`echo ${1} | sed -e 's@^[0-9]\{1\}-@@'`
|
---|
[fe30c61] | 67 |
|
---|
| 68 | # The use of 'head' is necessary to limit the return value to the FIRST match..
|
---|
| 69 | # hopefully this will not cause problems.
|
---|
| 70 | #
|
---|
| 71 | case $script_name in
|
---|
| 72 | tcl) echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 73 | ;;
|
---|
[608fbe1] | 74 | iputils) echo $(grep "^iputils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 75 | ;;
|
---|
[7214dad] | 76 | powerpc-utils) echo $(grep "^powerpc-utils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 77 | ;;
|
---|
[3c38ab0] | 78 | uClibc)
|
---|
| 79 | if [[ "${PROGNAME}" = "clfs3" ]]; then
|
---|
| 80 | echo $(grep "^uClibc-" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[7214dad] | 81 | else
|
---|
[3c38ab0] | 82 | echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[7214dad] | 83 | fi
|
---|
| 84 | ;;
|
---|
[fe30c61] | 85 | linux-headers)
|
---|
[31a37db] | 86 | if [[ "${PROGNAME}" = "lfs" ]] || [[ "${PROGNAME}" = "hlfs" ]] || [[ "${PROGNAME}" = "clfs" ]]; then
|
---|
[fe30c61] | 87 | # Uses kernel headers directly
|
---|
| 88 | echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 89 | else
|
---|
[608fbe1] | 90 | # CLFS{2,3} used to use massaged headers package
|
---|
| 91 | # echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 92 | echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[fe30c61] | 93 | fi
|
---|
| 94 | ;;
|
---|
[d8006a00] | 95 | expect) echo $(grep "^expect" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 96 | ;;
|
---|
[608fbe1] | 97 | e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 98 | ;;
|
---|
[f0a31de] | 99 | libcap) echo $(grep "^libcap" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 100 | ;;
|
---|
[82808d1] | 101 | util-linux-libs | util-linux-pass1) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[608fbe1] | 102 | ;;
|
---|
[4b54394] | 103 | xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[083e2fd] | 104 | ;;
|
---|
[7072e1f] | 105 | sqlite) echo $(grep "^sqlite" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[083e2fd] | 106 | ;;
|
---|
| 107 | udev) echo $(grep "^systemd" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 108 | ;;
|
---|
[8099885] | 109 | xml-parser) echo $(grep "^XML" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 110 | ;;
|
---|
| 111 | libdbus) echo $(grep "^dbus" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 112 | ;;
|
---|
[7072e1f] | 113 | *) echo $(grep "^$script_name[_-][[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[fe30c61] | 114 | ;;
|
---|
| 115 | esac
|
---|
| 116 |
|
---|
| 117 | }
|
---|
| 118 |
|
---|
[3cb4ef5b] | 119 | #----------------------------------#
|
---|
| 120 | get_package_version() { #
|
---|
| 121 | #----------------------------------#
|
---|
| 122 | # Those hacks may change depending on the invention of devs for tarball names.
|
---|
| 123 | # Normally, we expect -digit to signal the beginning of the version field
|
---|
| 124 | # but it may happen that there is no '-' (tcl, expect), that the version
|
---|
| 125 | # field is ddd-d (pkg-config-lite-028-1, since sed is greedy, it finds only
|
---|
| 126 | # the second dash) or that the first character of the version is not a digit
|
---|
| 127 | # (iputils-s20121221)...
|
---|
| 128 | case ${1} in
|
---|
| 129 | tcl*|expect*|tzdata*|xmlts*|unzip*|lynx*)
|
---|
| 130 | echo ${1} | sed -e 's@^[^[:digit:]]*@@' \
|
---|
| 131 | -e 's@\(-src\)*\.tar.*@@'
|
---|
| 132 | ;;
|
---|
| 133 | iputils*) echo ${1} | sed -e 's@^.*-@@' \
|
---|
| 134 | -e 's@\.tar.*@@'
|
---|
| 135 | ;;
|
---|
| 136 | LVM*) echo ${1} | sed -e 's@^[^.]*\.@@' \
|
---|
| 137 | -e 's@\.tgz.*@@'
|
---|
| 138 | ;;
|
---|
| 139 | iproute*) echo ${1} | sed -e 's@^[^-]*-@@' \
|
---|
| 140 | -e 's@\.tar.*@@'
|
---|
| 141 | ;;
|
---|
| 142 | pkg*|udev*|Singular*)
|
---|
| 143 | echo ${1} | sed -e 's@^.*[a-z]-\([[:digit:]]\)@\1@' \
|
---|
| 144 | -e 's@\.tar.*@@' \
|
---|
| 145 | -e 's@\.zip.*@@'
|
---|
| 146 | ;;
|
---|
| 147 | *) echo ${1} | sed -e 's@^.*[-_]\([[:digit:]]\)@\1@' \
|
---|
| 148 | -e 's@\.tar.*@@' \
|
---|
| 149 | -e 's@\.zip.*@@'
|
---|
| 150 | ;;
|
---|
| 151 | esac
|
---|
| 152 |
|
---|
| 153 | }
|
---|
[fe30c61] | 154 | #=======================
|
---|
| 155 |
|
---|
| 156 |
|
---|
| 157 | #==== TARGET HEADER ====
|
---|
| 158 |
|
---|
| 159 | #----------------------------------#
|
---|
| 160 | LUSER_wrt_target() { # Create target and initialize log file
|
---|
| 161 | #----------------------------------#
|
---|
| 162 | local i=$1
|
---|
| 163 | local PREV=$2
|
---|
[3cb4ef5b] | 164 | local version
|
---|
| 165 | if [ "$3" != "" ]; then
|
---|
| 166 | version=-$3
|
---|
| 167 | fi
|
---|
[fe30c61] | 168 | (
|
---|
| 169 | cat << EOF
|
---|
| 170 |
|
---|
| 171 | $i: $PREV
|
---|
| 172 | @\$(call echo_message, Building)
|
---|
[75d6d1c] | 173 | ${NO_PROGRESS} @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
|
---|
[3cb4ef5b] | 174 | @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
|
---|
| 175 | @\$(PRT_DU) >>logs/\$@$version
|
---|
[fe30c61] | 176 | EOF
|
---|
| 177 | ) >> $MKFILE.tmp
|
---|
| 178 | }
|
---|
| 179 |
|
---|
| 180 | #----------------------------------#
|
---|
| 181 | CHROOT_wrt_target() { # Create target and initialize log file
|
---|
| 182 | #----------------------------------#
|
---|
| 183 | local i=$1
|
---|
| 184 | local PREV=$2
|
---|
[3cb4ef5b] | 185 | local version
|
---|
| 186 | if [ "$3" != "" ]; then
|
---|
| 187 | version=-$3
|
---|
| 188 | fi
|
---|
[fe30c61] | 189 | (
|
---|
| 190 | cat << EOF
|
---|
| 191 |
|
---|
| 192 | $i: $PREV
|
---|
| 193 | @\$(call echo_message, Building)
|
---|
[75d6d1c] | 194 | ${NO_PROGRESS} @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
|
---|
[3cb4ef5b] | 195 | @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
|
---|
| 196 | @\$(PRT_DU_CR) >>logs/\$@$version
|
---|
[fe30c61] | 197 | EOF
|
---|
| 198 | ) >> $MKFILE.tmp
|
---|
| 199 | }
|
---|
| 200 |
|
---|
| 201 | #=======================
|
---|
| 202 |
|
---|
| 203 |
|
---|
| 204 | #======== UNPACK =======
|
---|
| 205 |
|
---|
| 206 | #----------------------------------#
|
---|
| 207 | LUSER_wrt_unpack() { # Unpack and set 'ROOT' var
|
---|
| 208 | #----------------------------------#
|
---|
| 209 | local FILE=$1
|
---|
| 210 | local optSAVE_PREVIOUS=$2
|
---|
| 211 |
|
---|
| 212 | if [[ "${optSAVE_PREVIOUS}" != "1" ]]; then
|
---|
| 213 | (
|
---|
| 214 | cat << EOF
|
---|
| 215 | @\$(call remove_existing_dirs,$FILE)
|
---|
| 216 | EOF
|
---|
| 217 | ) >> $MKFILE.tmp
|
---|
| 218 | fi
|
---|
| 219 |
|
---|
| 220 | (
|
---|
| 221 | cat << EOF
|
---|
| 222 | @\$(call unpack,$FILE)
|
---|
| 223 | @\$(call get_pkg_root_LUSER)
|
---|
| 224 | EOF
|
---|
| 225 | ) >> $MKFILE.tmp
|
---|
| 226 | }
|
---|
| 227 |
|
---|
| 228 | #----------------------------------#
|
---|
| 229 | CHROOT_Unpack() { #
|
---|
| 230 | #----------------------------------#
|
---|
| 231 | local FILE=$1
|
---|
| 232 | local optSAVE_PREVIOUS=$2
|
---|
| 233 |
|
---|
| 234 | if [ "${optSAVE_PREVIOUS}" != "1" ]; then
|
---|
| 235 | (
|
---|
| 236 | cat << EOF
|
---|
| 237 | @\$(call remove_existing_dirs2,$FILE)
|
---|
| 238 | EOF
|
---|
| 239 | ) >> $MKFILE.tmp
|
---|
| 240 | fi
|
---|
| 241 | (
|
---|
| 242 | cat << EOF
|
---|
[1f81129] | 243 | @\$(call unpack2,$FILE)
|
---|
[fe30c61] | 244 | @\$(call get_pkg_root2)
|
---|
| 245 | EOF
|
---|
| 246 | ) >> $MKFILE.tmp
|
---|
| 247 | }
|
---|
| 248 |
|
---|
| 249 | #=======================
|
---|
| 250 |
|
---|
| 251 |
|
---|
| 252 | #===== TESTS LOGS ======
|
---|
| 253 |
|
---|
| 254 | #----------------------------------#
|
---|
| 255 | LUSER_wrt_test_log() { # Initialize testsuite log file
|
---|
| 256 | #----------------------------------#
|
---|
[3cb4ef5b] | 257 | local version
|
---|
| 258 | if [ "$2" != "" ]; then
|
---|
| 259 | version=-$2
|
---|
| 260 | fi
|
---|
| 261 | local TESTLOGFILE=$1$version
|
---|
[fe30c61] | 262 | (
|
---|
| 263 | cat << EOF
|
---|
[6bb080e] | 264 | @echo "export TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
|
---|
[3cb4ef5b] | 265 | echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/$TESTLOGFILE
|
---|
[fe30c61] | 266 | EOF
|
---|
| 267 | ) >> $MKFILE.tmp
|
---|
| 268 | }
|
---|
| 269 |
|
---|
| 270 | #----------------------------------#
|
---|
| 271 | CHROOT_wrt_test_log() { #
|
---|
| 272 | #----------------------------------#
|
---|
[3cb4ef5b] | 273 | local version
|
---|
| 274 | if [ "$2" != "" ]; then
|
---|
| 275 | version=-$2
|
---|
| 276 | fi
|
---|
| 277 | local TESTLOGFILE=$1$version
|
---|
[fe30c61] | 278 | (
|
---|
| 279 | cat << EOF
|
---|
[8f2c086] | 280 | @echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
|
---|
[3cb4ef5b] | 281 | echo "\$(nl_)\`date\`\$(nl_)" >\$(crTESTLOGDIR)/$TESTLOGFILE
|
---|
[fe30c61] | 282 | EOF
|
---|
| 283 | ) >> $MKFILE.tmp
|
---|
| 284 | }
|
---|
| 285 |
|
---|
| 286 | #=======================
|
---|
| 287 |
|
---|
| 288 |
|
---|
| 289 | #======== RUN AS =======
|
---|
| 290 |
|
---|
| 291 | #----------------------------------#
|
---|
| 292 | wrt_RunAsRoot() { # Some scripts must be run as root..
|
---|
| 293 | #----------------------------------#
|
---|
| 294 | local MOUNT_ENV
|
---|
[3cb4ef5b] | 295 | local version
|
---|
| 296 | if [ "$2" != "" ]; then
|
---|
| 297 | version=-$2
|
---|
| 298 | fi
|
---|
[8f2c086] | 299 | local file=$1
|
---|
[fe30c61] | 300 |
|
---|
| 301 | case ${PROGNAME} in
|
---|
| 302 | lfs ) MOUNT_ENV="LFS" ;;
|
---|
| 303 | clfs ) MOUNT_ENV="CLFS" ;;
|
---|
| 304 | clfs2 ) MOUNT_ENV="CLFS" ;;
|
---|
| 305 | clfs3 ) MOUNT_ENV="CLFS" ;;
|
---|
| 306 | hlfs ) MOUNT_ENV="HLFS" ;;
|
---|
| 307 | *) echo "undefined progname $PROGNAME"; exit 1 ;;
|
---|
| 308 | esac
|
---|
| 309 |
|
---|
| 310 | (
|
---|
| 311 | cat << EOF
|
---|
[68713c9] | 312 | @export ${MOUNT_ENV}=\$(MOUNT_PT) && \\
|
---|
[3cb4ef5b] | 313 | ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
|
---|
| 314 | \$(PRT_DU) >>logs/\$@$version
|
---|
[fe30c61] | 315 | EOF
|
---|
| 316 | ) >> $MKFILE.tmp
|
---|
| 317 | }
|
---|
| 318 |
|
---|
| 319 | #----------------------------------#
|
---|
[0210014] | 320 | LUSER_wrt_RunAsUser() { # Calculate time with perl, footer to log file
|
---|
[fe30c61] | 321 | #----------------------------------#
|
---|
| 322 | local file=$1
|
---|
[3cb4ef5b] | 323 | local version
|
---|
| 324 | if [ "$2" != "" ]; then
|
---|
| 325 | version=-$2
|
---|
| 326 | fi
|
---|
[fe30c61] | 327 |
|
---|
| 328 | (
|
---|
| 329 | cat << EOF
|
---|
[68713c9] | 330 | @source ~/.bashrc && \\
|
---|
[3cb4ef5b] | 331 | \$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@$version 2>&1 && \\
|
---|
| 332 | \$(PRT_DU) >>logs/\$@$version
|
---|
[fe30c61] | 333 | EOF
|
---|
| 334 | ) >> $MKFILE.tmp
|
---|
| 335 | }
|
---|
| 336 |
|
---|
| 337 | #----------------------------------#
|
---|
| 338 | CHROOT_wrt_RunAsRoot() { #
|
---|
| 339 | #----------------------------------#
|
---|
| 340 | local file=$1
|
---|
[3cb4ef5b] | 341 | local version
|
---|
| 342 | if [ "$2" != "" ]; then
|
---|
| 343 | version=-$2
|
---|
| 344 | fi
|
---|
[fe30c61] | 345 | (
|
---|
| 346 | cat << EOF
|
---|
[68713c9] | 347 | @source envars && \\
|
---|
[3cb4ef5b] | 348 | \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
|
---|
| 349 | \$(PRT_DU_CR) >>logs/\$@$version
|
---|
[fe30c61] | 350 | EOF
|
---|
| 351 | ) >> $MKFILE.tmp
|
---|
| 352 |
|
---|
| 353 | }
|
---|
| 354 |
|
---|
| 355 | #=======================
|
---|
| 356 |
|
---|
| 357 |
|
---|
| 358 | #====== COPY FSTAB =====
|
---|
| 359 |
|
---|
| 360 | #----------------------------------#
|
---|
| 361 | LUSER_wrt_CopyFstab() { #
|
---|
| 362 | #----------------------------------#
|
---|
| 363 | (
|
---|
| 364 | cat << EOF
|
---|
[68713c9] | 365 | @cp -v \$(MOUNT_PT)/sources/fstab \$(MOUNT_PT)/etc/fstab >>logs/\$@ 2>&1 && \\
|
---|
[0210014] | 366 | \$(PRT_DU) >>logs/\$@
|
---|
[fe30c61] | 367 | EOF
|
---|
| 368 | ) >> $MKFILE.tmp
|
---|
| 369 | }
|
---|
| 370 |
|
---|
| 371 | #----------------------------------#
|
---|
| 372 | CHROOT_wrt_CopyFstab() { #
|
---|
| 373 | #----------------------------------#
|
---|
| 374 | (
|
---|
| 375 | cat << EOF
|
---|
[68713c9] | 376 | @cp -v /sources/fstab /etc/fstab >>logs/\$@ 2>&1 && \\
|
---|
[0210014] | 377 | \$(PRT_DU_CR) >>logs/\$@
|
---|
[fe30c61] | 378 | EOF
|
---|
| 379 | ) >> $MKFILE.tmp
|
---|
| 380 | }
|
---|
| 381 |
|
---|
| 382 | #=======================
|
---|
| 383 |
|
---|
| 384 |
|
---|
[93346ee] | 385 | #==== INSTALLED FILES LOGS ====
|
---|
| 386 |
|
---|
[f546320] | 387 | #----------------------------------#
|
---|
| 388 | LUSER_wrt_TouchTimestamp() { #
|
---|
| 389 | #----------------------------------#
|
---|
| 390 | (
|
---|
| 391 | cat << EOF
|
---|
| 392 | @\$(call touch_timestamp_LUSER)
|
---|
| 393 | EOF
|
---|
| 394 | ) >> $MKFILE.tmp
|
---|
| 395 | }
|
---|
| 396 |
|
---|
[93346ee] | 397 | #----------------------------------#
|
---|
| 398 | CHROOT_wrt_TouchTimestamp() { #
|
---|
| 399 | #----------------------------------#
|
---|
| 400 | (
|
---|
| 401 | cat << EOF
|
---|
| 402 | @\$(call touch_timestamp)
|
---|
| 403 | EOF
|
---|
| 404 | ) >> $MKFILE.tmp
|
---|
| 405 | }
|
---|
| 406 |
|
---|
[f546320] | 407 | #----------------------------------#
|
---|
| 408 | LUSER_wrt_LogNewFiles() { #
|
---|
| 409 | #----------------------------------#
|
---|
[e639536] | 410 | local name=`echo ${1} | sed 's/[0-9]-//'`
|
---|
[f546320] | 411 | (
|
---|
| 412 | cat << EOF
|
---|
| 413 | @\$(call log_new_files_LUSER,$name)
|
---|
| 414 | EOF
|
---|
| 415 | ) >> $MKFILE.tmp
|
---|
| 416 | }
|
---|
| 417 |
|
---|
[93346ee] | 418 | #----------------------------------#
|
---|
| 419 | CHROOT_wrt_LogNewFiles() { #
|
---|
| 420 | #----------------------------------#
|
---|
[e639536] | 421 | local name=`echo ${1} | sed 's/[0-9]-//'`
|
---|
[93346ee] | 422 | (
|
---|
| 423 | cat << EOF
|
---|
| 424 | @\$(call log_new_files,$name)
|
---|
| 425 | EOF
|
---|
| 426 | ) >> $MKFILE.tmp
|
---|
| 427 | }
|
---|
| 428 |
|
---|
| 429 | #=======================
|
---|
| 430 |
|
---|
| 431 |
|
---|
[fe30c61] | 432 | #==== RM BUILD DIRS ====
|
---|
| 433 |
|
---|
| 434 | #----------------------------------#
|
---|
| 435 | LUSER_RemoveBuildDirs() { #
|
---|
| 436 | #----------------------------------#
|
---|
[e639536] | 437 | local name=`echo ${1} | sed 's/[0-9]-//'`
|
---|
[fe30c61] | 438 | (
|
---|
| 439 | cat << EOF
|
---|
| 440 | @\$(call remove_build_dirs,$name)
|
---|
| 441 | EOF
|
---|
| 442 | ) >> $MKFILE.tmp
|
---|
| 443 | }
|
---|
| 444 |
|
---|
| 445 | #----------------------------------#
|
---|
| 446 | CHROOT_wrt_RemoveBuildDirs() { #
|
---|
| 447 | #----------------------------------#
|
---|
[e639536] | 448 | local name=`echo ${1} | sed 's/[0-9]-//'`
|
---|
[fe30c61] | 449 | (
|
---|
| 450 | cat << EOF
|
---|
| 451 | @\$(call remove_build_dirs2,$name)
|
---|
| 452 | EOF
|
---|
| 453 | ) >> $MKFILE.tmp
|
---|
| 454 | }
|
---|
| 455 |
|
---|
| 456 | #=======================
|
---|
| 457 |
|
---|
| 458 |
|
---|
| 459 | #======== TOUCH ========
|
---|
| 460 |
|
---|
| 461 | #----------------------------------#
|
---|
| 462 | wrt_touch() { #
|
---|
| 463 | #----------------------------------#
|
---|
| 464 | (
|
---|
| 465 | cat << EOF
|
---|
| 466 | @\$(call housekeeping)
|
---|
| 467 | EOF
|
---|
| 468 | ) >> $MKFILE.tmp
|
---|
| 469 | }
|
---|
| 470 |
|
---|
| 471 | #=======================
|
---|