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