Changeset 045b2dc for CLFS/master.sh
- Timestamp:
- 10/02/2006 07:32:06 PM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- f5fc83d
- Parents:
- 6f75d64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS/master.sh
r6f75d64 r045b2dc 1 1 #!/bin/sh 2 2 # $Id$ 3 4 5 orphan_scripts="" # 2 scripts do not fit BOOT_Makefiles LUSER environment 3 6 4 7 ################################### … … 6 9 ################################### 7 10 8 9 #----------------------------# 10 host_prep_Makefiles() { # Initialization of the system 11 #----------------------------# 11 #--------------------------------------# 12 BOOT_wrt_target() { # "${this_script}" "$PREV" 13 #--------------------------------------# 14 local i=$1 15 local PREV=$2 16 case $i in 17 iteration* ) local LOGFILE=$this_script.log ;; 18 * ) local LOGFILE=$this_script ;; 19 esac 20 ( 21 cat << EOF 22 23 $i: $PREV 24 @\$(call echo_message, Building) 25 @./progress_bar.sh \$@ \$\$PPID & 26 @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE 27 EOF 28 ) >> $MKFILE.tmp 29 } 30 31 #--------------------------------------# 32 BOOT_wrt_Unpack() { # "$pkg_tarball" 33 #--------------------------------------# 34 local FILE=$1 35 local optSAVE_PREVIOUS=$2 36 37 if [ "${optSAVE_PREVIOUS}" != "1" ]; then 38 ( 39 cat << EOF 40 @\$(call remove_existing_dirs2,$FILE) 41 EOF 42 ) >> $MKFILE.tmp 43 fi 44 ( 45 cat << EOF 46 @\$(call unpack3,$FILE) 47 @\$(call get_pkg_root2) 48 EOF 49 ) >> $MKFILE.tmp 50 } 51 52 #----------------------------------# 53 BOOT_wrt_RunAsRoot() { # "${this_script}" "${file}" 54 #----------------------------------# 55 local this_script=$1 56 local file=$2 57 ( 58 cat << EOF 59 @( time { source envars && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\ 60 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \`\n" >>logs/\$@ 61 EOF 62 ) >> $MKFILE.tmp 63 } 64 65 #--------------------------------------# 66 BOOT_wrt_RemoveBuildDirs() { # "${name}" 67 #--------------------------------------# 68 local name=$1 69 ( 70 cat << EOF 71 @\$(call remove_build_dirs2,$name) 72 EOF 73 ) >> $MKFILE.tmp 74 } 75 76 #----------------------------------# 77 BOOT_wrt_test_log() { # 78 #----------------------------------# 79 local TESTLOGFILE=$1 80 ( 81 cat << EOF 82 @echo "export TEST_LOG=/\$(SCRIPT_ROOT)/test-logs/$TESTLOGFILE" >> envars && \\ 83 echo -e "\n\`date\`\n" >test-logs/$TESTLOGFILE 84 EOF 85 ) >> $MKFILE.tmp 86 } 87 88 #----------------------------------# 89 BOOT_wrt_CopyFstab() { # 90 #----------------------------------# 91 ( 92 cat << EOF 93 @( time { cp -v /sources/fstab /etc/fstab >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script} 94 EOF 95 ) >> $MKFILE.tmp 96 } 97 98 99 ######################################## 100 101 102 #--------------------------------------# 103 host_prep_Makefiles() { # 104 #--------------------------------------# 12 105 local CLFS_HOST 13 106 14 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files ${R_arrow}"107 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files ( SETUP ) ${R_arrow}" 15 108 16 109 # defined here, only for ease of reading … … 79 172 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bashrc && \\ 80 173 touch envars && \\ 174 chmod -R a+wt \$(MOUNT_PT) && \\ 175 chown -R \$(LUSER) \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\ 81 176 touch \$@ && \\ 82 177 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 84 179 EOF 85 180 ) >> $MKFILE.tmp 86 87 } 88 89 90 91 #-----------------------------# 92 cross_tools_Makefiles() { # 93 #-----------------------------# 94 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools${R_arrow}" 181 host_prep=" 023-creatingtoolsdir 024-creatingcrossdir 026-settingenvironment" 182 183 } 184 185 #--------------------------------------# 186 cross_tools_Makefiles() { # 187 #--------------------------------------# 188 echo "${tab_}${GREEN}Processing... ${L_arrow}cross tools ( LUSER ) ${R_arrow}" 95 189 96 190 for file in cross-tools/* ; do … … 127 221 # Drop in the name of the target on a new line, and the previous target 128 222 # as a dependency. Also call the echo_message function. 129 wrt_target "${this_script}" "$PREV"223 LUSER_wrt_target "${this_script}" "$PREV" 130 224 # 131 225 # If $pkg_tarball isn't empty, we've got a package... 132 226 # 133 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball"134 # 135 wrt_RunAsUser "${this_script}""${file}"136 # 137 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"227 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 228 # 229 LUSER_wrt_RunAsUser "${file}" 230 # 231 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 138 232 # 139 233 # Include a touch of the target name so make can check if it's already been made. … … 150 244 } 151 245 152 153 #-----------------------------# 154 temptools_Makefiles() { # 155 #-----------------------------# 156 echo "${tab_}${GREEN}Processing... ${L_arrow}temp system${R_arrow}" 246 #--------------------------------------# 247 temptools_Makefiles() { # 248 #--------------------------------------# 249 echo "${tab_}${GREEN}Processing... ${L_arrow}temp system ( LUSER ) ${R_arrow}" 157 250 158 251 for file in temp-system/* ; do … … 185 278 # Drop in the name of the target on a new line, and the previous target 186 279 # as a dependency. Also call the echo_message function. 187 wrt_target "${this_script}" "$PREV"280 LUSER_wrt_target "${this_script}" "$PREV" 188 281 # 189 282 # If $pkg_tarball isn't empty, we've got a package... 190 283 # Insert instructions for unpacking the package and to set the PKGDIR variable. 191 284 # 192 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball"285 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 193 286 [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 194 287 # 195 wrt_RunAsUser "${this_script}""${file}"196 # 197 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"288 LUSER_wrt_RunAsUser "${file}" 289 # 290 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 198 291 # 199 292 # Include a touch of the target name so make can check if it's already been made. … … 210 303 211 304 212 #-----------------------------# 213 boot_Makefiles() { # 214 #-----------------------------# 215 echo "${tab_}${GREEN}Processing... ${L_arrow}boot${R_arrow}" 216 305 #--------------------------------------# 306 chroot_Makefiles() { # 307 #--------------------------------------# 308 echo "${tab_}${GREEN}Processing... ${L_arrow}tmptools CHROOT ( CHROOT ) ${R_arrow}" 309 310 for file in chroot/* ; do 311 # Keep the script file name 312 this_script=`basename $file` 313 # 314 # Skipping scripts is done now and not included in the build tree. 315 case $this_script in 316 *chroot*) continue ;; 317 esac 318 319 # 320 # First append each name of the script files to a list (this will become 321 # the names of the targets in the Makefile 322 case "${this_script}" in 323 *util-linux) orphan_scripts="${orphan_scripts} ${this_script}" ;; 324 *kernfs) orphan_scripts="${orphan_scripts} ${this_script}" ;; 325 *) chroottools="$chroottools $this_script" ;; 326 esac 327 328 # Grab the name of the target, strip id number, XXX-script 329 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 330 331 pkg_tarball=$(get_package_tarball_name $name) 332 333 # This is very ugly:: util-linux is in /chroot but must be run under LUSER 334 # .. Customized makefile entry 335 case "${this_script}" in 336 *util-linux) 337 LUSER_wrt_target "${this_script}" "$PREV" 338 LUSER_wrt_unpack "$pkg_tarball" 339 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 340 LUSER_wrt_RunAsUser "${file}" 341 LUSER_RemoveBuildDirs "${name}" 342 wrt_touch 343 temptools="$temptools $this_script" 344 continue ;; 345 esac 346 347 348 #--------------------------------------------------------------------# 349 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # 350 #--------------------------------------------------------------------# 351 # 352 # Drop in the name of the target on a new line, and the previous target 353 # as a dependency. Also call the echo_message function. 354 CHROOT_wrt_target "${this_script}" "$PREV" 355 # 356 # If $pkg_tarball isn't empty, we've got a package... 357 # Insert instructions for unpacking the package and changing directories 358 # 359 if [ "$pkg_tarball" != "" ] ; then 360 case $this_script in 361 *util-linux) ROOT_Unpack "$pkg_tarball" ;; 362 *) CHROOT_Unpack "$pkg_tarball" ;; 363 esac 364 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 365 fi 366 # 367 # Select a script execution method 368 case $this_script in 369 *kernfs) wrt_RunAsRoot "${this_script}" "${file}" ;; 370 *util-linux) ROOT_RunAsRoot "${file}" ;; 371 *) CHROOT_wrt_RunAsRoot "${file}" ;; 372 esac 373 # 374 # Housekeeping...remove the build directory(ies), except if the package build fails. 375 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 376 # 377 # Include a touch of the target name so make can check if it's already been made. 378 wrt_touch 379 # 380 #--------------------------------------------------------------------# 381 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 382 #--------------------------------------------------------------------# 383 # 384 # Keep the script file name for Makefile dependencies. 385 PREV=$this_script 386 387 done # for file in... 388 } 389 390 391 #--------------------------------------# 392 boot_Makefiles() { # 393 #--------------------------------------# 394 395 echo "${tab_}${GREEN}Processing... ${L_arrow}tmptools BOOT ( LUSER ) ${R_arrow}" 396 # 397 # Create a target bootable partition containing a compile environment. Later 398 # on we boot into this environment and contine the build. 399 # 217 400 for file in boot/* ; do 218 401 # Keep the script file name … … 223 406 *grub | *aboot | *colo | *silo | *arcload | *lilo ) continue ;; 224 407 *whatnext*) continue ;; 225 *kernel) # if there is no kernel config file do not build the kernel 408 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;; 409 *kernel) # if there is no kernel config file do not build the kernel 226 410 [[ -z $CONFIG ]] && continue 227 411 # Copy the config file to /sources with a standardized name … … 232 416 # First append each name of the script files to a list (this will become 233 417 # the names of the targets in the Makefile 234 boottools="$boottools $this_script" 418 case "${this_script}" in 419 *changingowner) orphan_scripts="${orphan_scripts} ${this_script}" ;; 420 *devices) orphan_scripts="${orphan_scripts} ${this_script}" ;; 421 *) boottools="$boottools $this_script" ;; 422 esac 235 423 # 236 424 # Grab the name of the target, strip id number and misc words. … … 257 445 # Drop in the name of the target on a new line, and the previous target 258 446 # as a dependency. Also call the echo_message function. 259 wrt_target "${this_script}" "$PREV"447 LUSER_wrt_target "${this_script}" "$PREV" 260 448 # 261 449 # If $pkg_tarball isn't empty, we've got a package... 262 450 # Insert instructions for unpacking the package and changing directories 263 451 # 264 [[ "$pkg_tarball" != "" ]] && wrt_unpack "$pkg_tarball"452 [[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball" 265 453 [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 266 454 # 267 455 # Select a script execution method 268 456 case $this_script in 457 # The following 2 scripts are defined in the /boot directory but need 458 # to be run as a root user. Set them up here but run them in another phase 269 459 *changingowner*) wrt_RunAsRoot "${this_script}" "${file}" ;; 270 460 *devices*) wrt_RunAsRoot "${this_script}" "${file}" ;; 271 461 *fstab*) if [[ -n "$FSTAB" ]]; then 272 wrt_copy_fstab "${this_script}"462 LUSER_wrt_CopyFstab 273 463 else 274 wrt_RunAsUser "${this_script}""${file}"464 LUSER_wrt_RunAsUser "${file}" 275 465 fi 276 466 ;; 277 *) wrt_RunAsUser "${this_script}""${file}" ;;467 *) LUSER_wrt_RunAsUser "${file}" ;; 278 468 esac 279 469 # 280 470 # Housekeeping...remove any build directory(ies) except if the package build fails. 281 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"471 [[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}" 282 472 # 283 473 # Include a touch of the target name so make can check if it's already been made. … … 295 485 296 486 297 #-----------------------------# 298 chroot_Makefiles() { # 299 #-----------------------------# 300 echo "${tab_}${GREEN}Processing... ${L_arrow}chroot${R_arrow}" 301 302 for file in chroot/* ; do 303 # Keep the script file name 304 this_script=`basename $file` 305 # 306 # Skipping scripts is done now and not included in the build tree. 307 case $this_script in 308 *chroot*) continue ;; 309 esac 310 311 # 312 # First append each name of the script files to a list (this will become 313 # the names of the targets in the Makefile 314 chroottools="$chroottools $this_script" 315 316 # Grab the name of the target, strip id number, XXX-script 317 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 318 319 pkg_tarball=$(get_package_tarball_name $name) 320 321 #--------------------------------------------------------------------# 322 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # 323 #--------------------------------------------------------------------# 324 # 325 # Drop in the name of the target on a new line, and the previous target 326 # as a dependency. Also call the echo_message function. 327 wrt_target "${this_script}" "$PREV" 328 # 329 # If $pkg_tarball isn't empty, we've got a package... 330 # Insert instructions for unpacking the package and changing directories 331 # 332 if [ "$pkg_tarball" != "" ] ; then 333 case $this_script in 334 *util-linux) wrt_unpack "$pkg_tarball" ;; 335 *) wrt_unpack2 "$pkg_tarball" ;; 336 esac 337 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 338 fi 339 # 340 # Select a script execution method 341 case $this_script in 342 *kernfs) wrt_RunAsRoot "${this_script}" "${file}" ;; 343 *util-linux) wrt_RunAsUser "${this_script}" "${file}" ;; 344 *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; 345 esac 346 # 347 # Housekeeping...remove the build directory(ies), except if the package build fails. 348 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 349 # 350 # Include a touch of the target name so make can check if it's already been made. 351 wrt_touch 352 # 353 #--------------------------------------------------------------------# 354 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< # 355 #--------------------------------------------------------------------# 356 # 357 # Keep the script file name for Makefile dependencies. 358 PREV=$this_script 359 360 done # for file in... 361 } 362 363 364 #-----------------------------# 365 testsuite_tools_Makefiles() { # 366 #-----------------------------# 367 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) testsuite tools${R_arrow}" 487 #--------------------------------------# 488 chroot_testsuite_tools_Makefiles() { # 489 #--------------------------------------# 490 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) testsuite tools ( CHROOT ) ${R_arrow}" 368 491 369 492 for file in testsuite-tools/* ; do … … 390 513 # Drop in the name of the target on a new line, and the previous target 391 514 # as a dependency. Also call the echo_message function. 392 wrt_target "${this_script}" "$PREV"393 # 394 wrt_unpack2"$pkg_tarball"515 CHROOT_wrt_target "${this_script}" "$PREV" 516 # 517 CHROOT_Unpack "$pkg_tarball" 395 518 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 396 519 # 397 wrt_run_as_chroot1 "${this_script}""${file}"398 # 399 wrt_remove_build_dirs "${name}"520 CHROOT_wrt_RunAsRoot "${file}" 521 # 522 CHROOT_wrt_RemoveBuildDirs "${name}" 400 523 # 401 524 # Include a touch of the target name so make can check if it's already been made. … … 412 535 } 413 536 414 415 #--------------------------------# 416 bm_testsuite_tools_Makefiles() { # 417 #--------------------------------# 418 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) testsuite tools${R_arrow}" 419 537 #--------------------------------------# 538 boot_testsuite_tools_Makefiles() { # 539 #--------------------------------------# 540 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) testsuite tools ( ROOT ) ${R_arrow}" 420 541 for file in testsuite-tools/* ; do 421 542 # Keep the script file name … … 442 563 # Drop in the name of the target on a new line, and the previous target 443 564 # as a dependency. Also call the echo_message function. 444 wrt_target_boot "${this_script}" "$PREV"445 # 446 wrt_unpack3"$pkg_tarball"565 BOOT_wrt_target "${this_script}" "$PREV" 566 # 567 BOOT_wrt_Unpack "$pkg_tarball" 447 568 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 448 569 # 449 wrt_run_as_root2"${this_script}" "${file}"450 # 451 wrt_remove_build_dirs2"${name}"570 BOOT_wrt_RunAsRoot "${this_script}" "${file}" 571 # 572 BOOT_wrt_RemoveBuildDirs "${name}" 452 573 # 453 574 # Include a touch of the target name so make can check if it's already been made. … … 462 583 463 584 done 464 } 465 466 467 #-----------------------------# 468 final_system_Makefiles() { # 469 #-----------------------------# 585 586 } 587 588 589 #--------------------------------------# 590 chroot_final_system_Makefiles() { # 591 #--------------------------------------# 470 592 # Set envars and scripts for iteration targets 471 593 LOGS="" # Start with an empty global LOGS envar … … 489 611 fi 490 612 491 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N ${R_arrow}"613 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N ( CHROOT ) ${R_arrow}" 492 614 493 615 for file in final-system$N/* ; do … … 536 658 # Drop in the name of the target on a new line, and the previous target 537 659 # as a dependency. Also call the echo_message function. 538 wrt_target "${this_script}${N}" "$PREV"660 CHROOT_wrt_target "${this_script}${N}" "$PREV" 539 661 540 662 # If $pkg_tarball isn't empty, we've got a package... 541 663 if [ "$pkg_tarball" != "" ] ; then 542 wrt_unpack2"$pkg_tarball"664 CHROOT_Unpack "$pkg_tarball" 543 665 # If the testsuites must be run, initialize the log file 544 666 case $name in 545 667 binutils | gcc | glibc ) 546 [[ "$TEST" != "0" ]] && wrt_test_log2"${this_script}"668 [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" 547 669 ;; 548 670 * ) 549 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2"${this_script}"671 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}" 550 672 ;; 551 673 esac … … 554 676 fi 555 677 # 556 wrt_run_as_chroot1 "${this_script}""${file}"557 # 558 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"678 CHROOT_wrt_RunAsRoot "${file}" 679 # 680 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 559 681 # 560 682 # Include a touch of the target name so make can check if it's already been made. … … 572 694 } 573 695 574 575 #-----------------------------# 576 bm_final_system_Makefiles() { # 577 #-----------------------------# 696 #--------------------------------------# 697 boot_final_system_Makefiles() { # 698 #--------------------------------------# 578 699 # Set envars and scripts for iteration targets 579 700 LOGS="" # Start with an empty global LOGS envar … … 599 720 fi 600 721 601 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N ${R_arrow}"722 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N ( ROOT ) ${R_arrow}" 602 723 603 724 for file in final-system$N/* ; do … … 647 768 # Drop in the name of the target on a new line, and the previous target 648 769 # as a dependency. Also call the echo_message function. 649 wrt_target_boot "${this_script}${N}" "$PREV"770 BOOT_wrt_target "${this_script}${N}" "$PREV" 650 771 651 772 # If $pkg_tarball isn't empty, we've got a package... 652 773 if [ "$pkg_tarball" != "" ] ; then 653 774 FILE="$pkg_tarball" 654 wrt_unpack3"$FILE"775 BOOT_wrt_Unpack "$FILE" 655 776 # If the testsuites must be run, initialize the log file 656 777 case $name in 657 778 binutils | gcc | glibc ) 658 [[ "$TEST" != "0" ]] && wrt_test_log2"${this_script}"779 [[ "$TEST" != "0" ]] && BOOT_wrt_test_log "${this_script}" 659 780 ;; 660 781 * ) 661 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2"${this_script}"782 [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && BOOT_wrt_test_log "${this_script}" 662 783 ;; 663 784 esac … … 666 787 fi 667 788 # 668 wrt_run_as_root2"${this_script}" "${file}"669 # 670 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2"${name}"789 BOOT_wrt_RunAsRoot "${this_script}" "${file}" 790 # 791 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}" 671 792 # 672 793 # Include a touch of the target name so make can check if it's already been made. … … 682 803 system_build=$basicsystem 683 804 done # for file in final-system/* ... 684 } 685 686 687 #----------------------------- #688 bootscripts_Makefiles() {#689 #----------------------------- #690 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) bootscripts${R_arrow}"805 806 } 807 808 #--------------------------------------# 809 chroot_bootscripts_Makefiles() { # 810 #--------------------------------------# 811 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) bootscripts ( CHROOT ) ${R_arrow}" 691 812 692 813 for file in bootscripts/* ; do … … 723 844 # Drop in the name of the target on a new line, and the previous target 724 845 # as a dependency. Also call the echo_message function. 725 wrt_target "${this_script}" "$PREV"846 CHROOT_wrt_target "${this_script}" "$PREV" 726 847 # 727 848 # If $pkg_tarball isn't empty, we've got a package... 728 849 # 729 [[ "$pkg_tarball" != "" ]] && wrt_unpack2"$pkg_tarball"730 # 731 wrt_run_as_chroot1 "${this_script}""${file}"732 # 733 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"850 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 851 # 852 CHROOT_wrt_RunAsRoot "${file}" 853 # 854 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 734 855 # 735 856 # Include a touch of the target name so make can check if it's already been made. … … 744 865 745 866 done # for file in bootscripts/* ... 746 747 } 748 749 #-----------------------------# 750 bm_bootscripts_Makefiles() { # 751 #-----------------------------# 752 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) bootscripts${R_arrow}" 867 } 868 869 #--------------------------------------# 870 boot_bootscripts_Makefiles() { # 871 #--------------------------------------# 872 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) bootscripts ( ROOT ) ${R_arrow}" 753 873 754 874 for file in bootscripts/* ; do … … 785 905 # Drop in the name of the target on a new line, and the previous target 786 906 # as a dependency. Also call the echo_message function. 787 wrt_target_boot "${this_script}" "$PREV"907 BOOT_wrt_target "${this_script}" "$PREV" 788 908 # 789 909 # If $pkg_tarball isn't empty, we've got a package... 790 910 # 791 [[ "$pkg_tarball" != "" ]] && wrt_unpack3"$pkg_tarball"792 # 793 wrt_run_as_root2"${this_script}" "${file}"794 # 795 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2"${name}"911 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_Unpack "$pkg_tarball" 912 # 913 BOOT_wrt_RunAsRoot "${this_script}" "${file}" 914 # 915 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}" 796 916 # 797 917 # Include a touch of the target name so make can check if it's already been made. … … 806 926 807 927 done # for file in bootscripts/* ... 808 809 } 810 811 812 813 #-----------------------------# 814 bootable_Makefiles() { # 815 #-----------------------------# 816 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) make bootable${R_arrow}" 928 } 929 930 #--------------------------------------# 931 chroot_bootable_Makefiles() { # 932 #--------------------------------------# 933 echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) make bootable ( CHROOT ) ${R_arrow}" 817 934 818 935 for file in {bootable,the-end}/* ; do … … 823 940 case $this_script in 824 941 *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;; 942 *fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;; 825 943 *kernel) # if there is no kernel config file do not build the kernel 826 944 [[ -z $CONFIG ]] && continue … … 849 967 # Drop in the name of the target on a new line, and the previous target 850 968 # as a dependency. Also call the echo_message function. 851 wrt_target "${this_script}" "$PREV"969 CHROOT_wrt_target "${this_script}" "$PREV" 852 970 # 853 971 # If $pkg_tarball isn't empty, we've got a package... 854 972 # Insert instructions for unpacking the package and changing directories 855 973 # 856 [[ "$pkg_tarball" != "" ]] && wrt_unpack2"$pkg_tarball"974 [[ "$pkg_tarball" != "" ]] && CHROOT_Unpack "$pkg_tarball" 857 975 # 858 976 # Select a script execution method 859 977 case $this_script in 860 *fstab*) if [[ -n "$FSTAB" ]]; then 861 wrt_copy_fstab "${this_script}" 862 else 863 wrt_run_as_chroot1 "${this_script}" "${file}" 864 fi 865 ;; 866 *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; 978 *fstab*) if [[ -n "$FSTAB" ]]; then 979 CHROOT_wrt_CopyFstab 980 else 981 CHROOT_wrt_RunAsRoot "${file}" 982 fi 983 ;; 984 *) CHROOT_wrt_RunAsRoot "${file}" 985 ;; 867 986 esac 868 987 # 869 988 # Housekeeping...remove any build directory(ies) except if the package build fails. 870 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"989 [[ "$pkg_tarball" != "" ]] && CHROOT_wrt_RemoveBuildDirs "${name}" 871 990 # 872 991 # Include a touch of the target name so make can check if it's already been made. … … 882 1001 done 883 1002 884 # Add SBU-disk_usage report target if required 885 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 886 887 } 888 889 890 891 #-----------------------------# 892 bm_bootable_Makefiles() { # 893 #-----------------------------# 894 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) make bootable${R_arrow}" 1003 } 1004 1005 #--------------------------------------# 1006 boot_bootable_Makefiles() { # 1007 #--------------------------------------# 1008 echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) make bootable ( ROOT ) ${R_arrow}" 895 1009 896 1010 for file in {bootable,the-end}/* ; do … … 926 1040 # Drop in the name of the target on a new line, and the previous target 927 1041 # as a dependency. Also call the echo_message function. 928 wrt_target_boot "${this_script}" "$PREV"1042 BOOT_wrt_target "${this_script}" "$PREV" 929 1043 # 930 1044 # If $pkg_tarball isn't empty, we've got a package... 931 1045 # Insert instructions for unpacking the package and changing directories 932 1046 # 933 [[ "$pkg_tarball" != "" ]] && wrt_unpack3"$pkg_tarball"1047 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_Unpack "$pkg_tarball" 934 1048 # 935 1049 # Select a script execution method … … 938 1052 # Minimal boot mode has no access to original file, store in /sources 939 1053 cp $FSTAB $BUILDDIR/sources/fstab 940 wrt_copy_fstab2"${this_script}"1054 BOOT_wrt_CopyFstab "${this_script}" 941 1055 else 942 wrt_run_as_root2"${this_script}" "${file}"1056 BOOT_wrt_RunAsRoot "${this_script}" "${file}" 943 1057 fi 944 1058 ;; 945 *) wrt_run_as_root2"${this_script}" "${file}" ;;1059 *) BOOT_wrt_RunAsRoot "${this_script}" "${file}" ;; 946 1060 esac 947 1061 # 948 1062 # Housekeeping...remove any build directory(ies) except if the package build fails. 949 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2"${name}"1063 [[ "$pkg_tarball" != "" ]] && BOOT_wrt_RemoveBuildDirs "${name}" 950 1064 # 951 1065 # Include a touch of the target name so make can check if it's already been made. … … 958 1072 # Keep the script file name for Makefile dependencies. 959 1073 PREV=$this_script 960 961 1074 done 962 1075 963 # Add SBU-disk_usage report target if required 964 if [[ "$REPORT" = "y" ]] ; then wrt_report ; fi 965 966 } 967 968 969 #-----------------------------# 970 build_Makefile() { # Construct a Makefile from the book scripts 971 #-----------------------------# 972 echo "Creating Makefile... ${BOLD}START${OFF}" 1076 } 1077 1078 1079 #--------------------------------------# 1080 build_Makefile() { # Construct a Makefile from the book scripts 1081 #--------------------------------------# 1082 # 1083 # Script crashes if error trapping is on 1084 # 1085 set +e 1086 declare -f method_cmds 1087 declare -f testsuite_cmds 1088 declare -f final_sys_cmds 1089 declare -f bootscripts_cmds 1090 declare -f bootable_cmds 1091 set -e 1092 1093 echo "...Creating Makefile... ${BOLD}START${OFF}" 973 1094 974 1095 cd $JHALFSDIR/${PROGNAME}-commands 975 # Start with a clean Makefile.tmp file 1096 # Start with a clean files 1097 >$MKFILE 976 1098 >$MKFILE.tmp 977 1099 978 host_prep_Makefiles 979 cross_tools_Makefiles # $cross_tools 980 temptools_Makefiles # $temptools 981 if [[ $METHOD = "chroot" ]]; then 982 chroot_Makefiles # $chroottools 983 if [[ ! $TEST = "0" ]]; then 984 testsuite_tools_Makefiles # $testsuitetools 985 fi 986 final_system_Makefiles # $basicsystem 1100 method_cmds=${METHOD}_Makefiles 1101 testsuite_cmds=${METHOD}_testsuite_tools_Makefiles 1102 final_sys_cmds=${METHOD}_final_system_Makefiles 1103 bootscripts_cmds=${METHOD}_bootscripts_Makefiles 1104 bootable_cmds=${METHOD}_bootable_Makefiles 1105 1106 host_prep_Makefiles # mk_SETUP (SETUP) $host_prep 1107 cross_tools_Makefiles # mk_CROSS (LUSER) $cross_tools 1108 temptools_Makefiles # mk_TEMP (LUSER) $temptools 1109 $method_cmds # mk_SYSTOOLS (CHROOT) $chroottools/$boottools 1110 if [[ ! $TEST = "0" ]]; then 1111 $testsuite_cmds # mk_SYSTOOLS (CHROOT) $testsuitetools 1112 fi 1113 $final_sys_cmds # mk_FINAL (CHROOT) $basicsystem 987 1114 # Add the iterations targets, if needed 988 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 989 bootscripts_Makefiles # $bootscripttools 990 bootable_Makefiles # $bootabletools 991 else 992 boot_Makefiles # $boottools 993 if [[ ! $TEST = "0" ]]; then 994 bm_testsuite_tools_Makefiles # $testsuitetools 995 fi 996 bm_final_system_Makefiles # $basicsystem 997 # Add the iterations targets, if needed 998 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 999 bm_bootscripts_Makefiles # $bootscipttools 1000 bm_bootable_Makefiles # $bootabletoosl 1001 fi 1002 # the_end_Makefiles 1003 1115 [[ "$COMPARE" = "y" ]] && wrt_compare_targets 1116 $bootscripts_cmds # mk_BOOTSCRIPT (CHROOT) $bootscripttools 1117 $bootable_cmds # mk_BOOTABLE (CHROOT) $bootabletools 1004 1118 1005 1119 # Add a header, some variables and include the function file … … 1030 1144 LUSER_HOME = /home/\$(LUSER) 1031 1145 PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" 1032 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT)\`\n" 1033 1146 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n" 1147 1148 export PATH := \${PATH}:/usr/sbin 1034 1149 1035 1150 include makefile-functions … … 1057 1172 fi 1058 1173 1059 # Drop in the main target 'all:' and the chapter targets with each sub-target 1060 # as a dependency. 1174 ################## CHROOT #################### 1175 1061 1176 if [[ "${METHOD}" = "chroot" ]]; then 1062 1177 ( 1063 cat << EOF 1064 all: chapter2 chapter3 chapter4 chapter5 chapter6 chapter7 chapter8 do-housekeeping 1178 cat << EOF 1179 1180 all: ck_UID mk_SETUP mk_CROSS mk_SUDO mk_SYSTOOLS create-sbu_du-report 1181 @sudo make do-housekeeping 1065 1182 @\$(call echo_finished,$VERSION) 1066 1183 1067 chapter2: 023-creatingtoolsdir 024-creatingcrossdir 025-addinguser 026-settingenvironment 1068 1069 chapter3: chapter2 $cross_tools 1070 1071 chapter4: chapter3 $temptools 1072 1073 chapter5: chapter4 $chroottools restore-luser-env $testsuitetools 1074 1075 chapter6: chapter5 $basicsystem 1076 1077 chapter7: chapter6 $bootscripttools 1078 1079 chapter8: chapter7 $bootabletools 1080 1081 clean-all: clean 1082 rm -rf ./{clfs-commands,logs,Makefile,*.xsl,makefile-functions,packages,patches} 1083 1084 clean: clean-chapter4 clean-chapter3 clean-chapter2 1085 1086 restart: 1087 @echo "This feature does not exist for the CLFS makefile. (yet)" 1088 1089 clean-chapter2: 1090 -if [ ! -f luser-exist ]; then \\ 1184 ck_UID: 1185 @if [ \`id -u\` = "0" ]; then \\ 1186 echo "+--------------------------------------------------+"; \\ 1187 echo "|You cannot run this makefile from the root account|"; \\ 1188 echo "+--------------------------------------------------+"; \\ 1189 exit 1; \\ 1190 fi 1191 1192 #---------------AS ROOT 1193 mk_SETUP: 1194 @\$(call echo_SU_request) 1195 @sudo make SETUP 1196 @touch \$@ 1197 1198 #---------------AS LUSER 1199 mk_CROSS: mk_SETUP 1200 @\$(call echo_PHASE,Cross and Temporary Tools) 1201 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" ) 1202 @sudo make restore-luser-env 1203 @touch \$@ 1204 1205 mk_SUDO: mk_CROSS 1206 @sudo make SUDO 1207 @touch \$@ 1208 # 1209 # The convoluted piece of code below is necessary to provide 'make' with a valid shell in the 1210 # chroot environment. (Unless someone knows a different way) 1211 # Manually create the /bin directory and provide link to the /tools dir. 1212 # Also change the original symlink creation to include (f)orce to prevent failure due to 1213 # pre-existing links. 1214 1215 #---------------CHROOT JAIL 1216 mk_SYSTOOLS: mk_SUDO 1217 @if [ ! -e \$(MOUNT_PT)/bin ]; then \\ 1218 mkdir \$(MOUNT_PT)/bin; \\ 1219 cd \$(MOUNT_PT)/bin && \\ 1220 ln -svf /tools/bin/bash bash; ln -sf bash sh; \\ 1221 sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\ 1222 fi; 1223 @sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chroot/082-createfiles 1224 @\$(call echo_CHROOT_request) 1225 @\$(call echo_PHASE, CHROOT JAIL ) 1226 @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL") 1227 @touch \$@ 1228 1229 1230 1231 SETUP: $host_prep 1232 AS_LUSER: $cross_tools $temptools 1233 SUDO: $orphan_scripts 1234 CHROOT_JAIL: ${chroottools}${boottools} $testsuitetools $basicsystem $bootscripttools $bootabletools 1235 1236 do-housekeeping: 1237 @-umount \$(MOUNT_PT)/dev/pts 1238 @-umount \$(MOUNT_PT)/dev/shm 1239 @-umount \$(MOUNT_PT)/dev 1240 @-umount \$(MOUNT_PT)/sys 1241 @-umount \$(MOUNT_PT)/proc 1242 @-rm /tools /cross-tools 1243 @-if [ ! -f luser-exist ]; then \\ 1091 1244 userdel \$(LUSER); \\ 1092 1245 rm -rf /home/\$(LUSER); \\ 1093 1246 fi; 1094 rm -rf \$(MOUNT_PT)/tools 1095 rm -f /tools 1096 rm -rf \$(MOUNT_PT)/cross-tools 1097 rm -f /cross-tools 1098 rm -f envars luser-exist 1099 rm -f 02* logs/02*.log 1100 1101 clean-chapter3: 1102 rm -rf \$(MOUNT_PT)/tools/* 1103 rm -f $cross_tools sources-dir 1104 cd logs && rm -f $cross_tools && cd .. 1105 1106 clean-chapter4: 1107 -umount \$(MOUNT_PT)/sys 1108 -umount \$(MOUNT_PT)/proc 1109 -umount \$(MOUNT_PT)/dev/shm 1110 -umount \$(MOUNT_PT)/dev/pts 1111 -umount \$(MOUNT_PT)/dev 1112 rm -rf \$(MOUNT_PT)/{bin,boot,dev,etc,home,lib,lib64,media,mnt,opt,proc,root,sbin,srv,sys,tmp,usr,var} 1113 rm -f $temptools 1114 cd logs && rm -f $temptools && cd .. 1115 1247 1248 EOF 1249 ) >> $MKFILE 1250 1251 # Add SBU-disk_usage report target 1252 echo "create-sbu_du-report:" >> $MKFILE 1253 if [[ "$REPORT" = "y" ]] ; then 1254 ( 1255 cat << EOF 1256 @\$(call echo_message, Building) 1257 @./create-sbu_du-report.sh logs $VERSION 1258 @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) 1259 @touch \$@ 1260 1261 EOF 1262 ) >> $MKFILE 1263 else echo -e "\t@true\n" >> $MKFILE; fi 1264 1265 fi 1266 1267 ################### BOOT ##################### 1268 1269 if [[ "${METHOD}" = "boot" ]]; then 1270 ( 1271 cat << EOF 1272 1273 all: ck_UID mk_SETUP mk_CROSS mk_SUDO 1274 @sudo make restore-luser-env 1275 @sudo make do-housekeeping 1276 @\$(call echo_boot_finished,$VERSION) 1277 1278 makesys: mk_FINAL 1279 @\$(call echo_finished,$VERSION) 1280 1281 1282 ck_UID: 1283 @if [ \`id -u\` = "0" ]; then \\ 1284 echo "+--------------------------------------------------+"; \\ 1285 echo "|You cannot run this makefile from the root account|"; \\ 1286 echo "|However, if this is the boot environment |"; \\ 1287 echo "| the command you are looking for is |"; \\ 1288 echo "| make makesys |"; \\ 1289 echo "| to finish off the build |"; \\ 1290 echo "+--------------------------------------------------+"; \\ 1291 exit 1; \\ 1292 fi 1293 1294 #---------------AS ROOT 1295 1296 mk_SETUP: 1297 @\$(call echo_SU_request) 1298 @sudo make SETUP 1299 @touch \$@ 1300 1301 #---------------AS LUSER 1302 1303 mk_CROSS: mk_SETUP 1304 @\$(call echo_PHASE,Cross Tool) 1305 @(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make AS_LUSER" ) 1306 @touch \$@ 1307 1308 mk_SUDO: mk_SYSTOOLS 1309 @sudo make SUDO 1310 @touch \$@ 1311 1312 #---------------AS ROOT 1313 1314 mk_FINAL: 1315 @\$(call echo_PHASE,Final System) 1316 @( make AS_ROOT ) 1317 @touch \$@ 1318 1319 SETUP: $host_prep 1320 AS_LUSER: $cross_tools $temptools ${chroottools}${boottools} 1321 SUDO: $orphan_scripts 1322 AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools 1323 1324 do-housekeeping: 1325 @-rm /tools /cross-tools 1326 @-if [ ! -f luser-exist ]; then \\ 1327 userdel \$(LUSER); \\ 1328 rm -rf /home/\$(LUSER); \\ 1329 fi; 1330 1331 EOF 1332 ) >> $MKFILE 1333 fi 1334 1335 ( 1336 cat << EOF 1337 1338 1339 restart: 1340 @echo "This feature does not exist for the CLFS makefile. (yet)" 1116 1341 1117 1342 restore-luser-env: … … 1128 1353 echo --------------------------------------------------------------------------------\$(WHITE) 1129 1354 1130 do-housekeeping: 1131 @-umount \$(MOUNT_PT)/dev/pts 1132 @-umount \$(MOUNT_PT)/dev/shm 1133 @-umount \$(MOUNT_PT)/dev 1134 @-umount \$(MOUNT_PT)/sys 1135 @-umount \$(MOUNT_PT)/proc 1136 @-if [ ! -f luser-exist ]; then \\ 1137 userdel \$(LUSER); \\ 1138 rm -rf /home/\$(LUSER); \\ 1139 fi; 1355 ######################################################## 1356 1140 1357 1141 1358 EOF 1142 1359 ) >> $MKFILE 1143 fi1144 1145 1146 if [[ "${METHOD}" = "boot" ]]; then1147 (1148 cat << EOF1149 1150 all: makeboot1151 1152 makeboot: 023-creatingtoolsdir 024-creatingcrossdir 025-addinguser 026-settingenvironment \1153 $cross_tools\1154 $temptools \1155 $chroottools \1156 $boottools restore-luser-env1157 @\$(call echo_boot_finished,$VERSION)1158 1159 makesys: $testsuitetools $basicsystem $bootscripttools $bootabletools1160 @\$(call echo_finished,$VERSION)1161 1162 1163 clean-all: clean1164 rm -rf ./{clfs-commands,logs,Makefile,*.xsl,makefile-functions,packages,patches}1165 1166 clean: clean-makesys clean-makeboot clean-jhalfs1167 1168 restart:1169 @echo "This feature does not exist for the CLFS makefile. (yet)"1170 1171 clean-jhalfs:1172 -if [ ! -f luser-exist ]; then \\1173 userdel \$(LUSER); \\1174 rm -rf /home/\$(LUSER); \\1175 fi;1176 rm -rf \$(MOUNT_PT)/tools1177 rm -f /tools1178 rm -rf \$(MOUNT_PT)/cross-tools1179 rm -f /cross-tools1180 rm -f envars luser-exist1181 rm -f 02* logs/02*.log1182 1183 clean-makeboot:1184 rm -rf /tools/*1185 rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools1186 rm -f restore-luser-env sources-dir1187 cd logs && rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools && cd ..1188 1189 clean-makesys:1190 -umount \$(MOUNT_PT)/sys1191 -umount \$(MOUNT_PT)/proc1192 -umount \$(MOUNT_PT)/dev/shm1193 -umount \$(MOUNT_PT)/dev/pts1194 -umount \$(MOUNT_PT)/dev1195 rm -rf \$(MOUNT_PT)/{bin,boot,dev,etc,home,lib,lib64,media,mnt,opt,proc,root,sbin,srv,sys,tmp,usr,var}1196 rm -f $basicsystem1197 rm -f $bootscripttools1198 rm -f $bootabletools1199 cd logs && rm -f $basicsystem && rm -f $bootscripttools && rm -f $bootabletools && cd ..1200 1201 1202 restore-luser-env:1203 @\$(call echo_message, Building)1204 @if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\1205 mv -fv /home/\$(LUSER)/.bashrc.XXX /home/\$(LUSER)/.bashrc; \\1206 fi;1207 @if [ -f /home/\$(LUSER)/.bash_profile.XXX ]; then \\1208 mv -v /home/\$(LUSER)/.bash_profile.XXX /home/\$(LUSER)/.bash_profile; \\1209 fi;1210 @chown \$(LUSER):\$(LGROUP) /home/\$(LUSER)/.bash* && \\1211 touch \$@ && \\1212 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\1213 echo --------------------------------------------------------------------------------\$(WHITE)1214 1215 1216 EOF1217 ) >> $MKFILE1218 fi1219 1360 1220 1361 # Bring over the items from the Makefile.tmp 1221 1362 cat $MKFILE.tmp >> $MKFILE 1222 1363 rm $MKFILE.tmp 1364 1223 1365 echo "Creating Makefile... ${BOLD}DONE${OFF}" 1224 1225 } 1226 1366 }
Note:
See TracChangeset
for help on using the changeset viewer.