From be6109e5245e714749077c9fed0707733a749969 Mon Sep 17 00:00:00 2001 From: "Jorge Manuel B. S. Vicetto (jmbsvicetto)" Date: Sat, 22 Sep 2012 03:28:34 +0000 Subject: [PATCH] Whitespace. --- targets/embedded/embedded-chroot.sh | 2 +- targets/embedded/embedded-controller.sh | 4 ++-- targets/grp/grp-controller.sh | 3 ++- .../livecd-stage1/livecd-stage1-controller.sh | 1 + .../livecd-stage2/livecd-stage2-controller.sh | 14 ++++++++++++-- targets/netboot/netboot-combine.sh | 2 +- targets/netboot/netboot-controller.sh | 10 +++++++++- targets/netboot/netboot-image.sh | 2 +- targets/netboot2/netboot2-controller.sh | 7 +++++++ targets/netboot2/netboot2-copyfile.sh | 2 +- targets/stage1/stage1-controller.sh | 4 ++++ targets/stage2/stage2-chroot.sh | 1 - targets/stage2/stage2-controller.sh | 4 ++++ targets/stage3/stage3-controller.sh | 4 ++++ targets/stage4/stage4-controller.sh | 16 +++++++++++++++- targets/support/bootloader-setup.sh | 1 + targets/support/chroot-functions.sh | 2 +- targets/support/create-iso.sh | 4 ++-- targets/support/filesystem-functions.sh | 2 +- targets/tinderbox/tinderbox-chroot.sh | 4 ++-- 20 files changed, 71 insertions(+), 18 deletions(-) diff --git a/targets/embedded/embedded-chroot.sh b/targets/embedded/embedded-chroot.sh index 89e834c5..2fbba278 100644 --- a/targets/embedded/embedded-chroot.sh +++ b/targets/embedded/embedded-chroot.sh @@ -10,6 +10,6 @@ echo "Installing dependencies into ${DESTROOT}..." run_merge -o "${clst_embedded_packages}" export clst_root_path="${DESTROOT}" -export INSTALL_MASK="${clst_install_mask}" +export INSTALL_MASK="${clst_install_mask}" run_merge -1 -O "${clst_embedded_packages}" diff --git a/targets/embedded/embedded-controller.sh b/targets/embedded/embedded-controller.sh index 52ef3a41..2a0c5fe7 100644 --- a/targets/embedded/embedded-controller.sh +++ b/targets/embedded/embedded-controller.sh @@ -20,7 +20,7 @@ case ${1} in # package) # export root_fs_path="${clst_chroot_path}/tmp/mergeroot" # install -d ${clst_image_path} - + # ${clst_sharedir}/targets/embedded/embedded-fs-runscript.sh \ # ${clst_embedded_fs_type} || exit 1 # imagesize=`du -sk ${clst_image_path}/root.img | cut -f1` @@ -68,7 +68,7 @@ case ${1} in ${clst_sharedir}/targets/support/bootloader-setup.sh ${1} ;; - + iso) shift ${clst_sharedir}/targets/support/create-iso.sh ${1} diff --git a/targets/grp/grp-controller.sh b/targets/grp/grp-controller.sh index cac3198e..541429a2 100644 --- a/targets/grp/grp-controller.sh +++ b/targets/grp/grp-controller.sh @@ -6,6 +6,7 @@ case $1 in enter) ${clst_CHROOT} ${clst_chroot_path} ;; + run) shift export clst_grp_type=$1 @@ -24,7 +25,7 @@ case $1 in clean) exit 0 ;; - + *) exit 1 ;; diff --git a/targets/livecd-stage1/livecd-stage1-controller.sh b/targets/livecd-stage1/livecd-stage1-controller.sh index 5be36f03..f3b1f40e 100644 --- a/targets/livecd-stage1/livecd-stage1-controller.sh +++ b/targets/livecd-stage1/livecd-stage1-controller.sh @@ -12,6 +12,7 @@ case $1 in ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh echo "${clst_packages}" > ${clst_chroot_path}/tmp/packages.txt ;; + clean) find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \; ;; diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh index 44a0e589..687c208d 100644 --- a/targets/livecd-stage2/livecd-stage2-controller.sh +++ b/targets/livecd-stage2/livecd-stage2-controller.sh @@ -7,10 +7,12 @@ case $1 in # Sets up the build environment before any kernels are compiled exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh ;; + post-kmerge) # Cleans up the build environment after the kernels are compiled exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh ;; + kernel) shift export clst_kname="$1" @@ -53,7 +55,7 @@ case $1 in fi ;; esac - + # move over the environment cp -f ${clst_sharedir}/livecd/files/livecd-bashrc \ ${clst_chroot_path}/root/.bashrc @@ -61,7 +63,7 @@ case $1 in ${clst_chroot_path}/root/.bash_profile cp -f ${clst_sharedir}/livecd/files/livecd-local.start \ ${clst_chroot_path}/etc/conf.d/local.start - + # execute copy gamecd.conf if we're a gamecd if [ "${clst_livecd_type}" = "gentoo-gamecd" ] then @@ -74,6 +76,7 @@ case $1 in fi fi ;; + livecd-update) # Now, finalize and tweak the livecd fs (inside of the chroot) exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh @@ -87,12 +90,15 @@ case $1 in ${clst_chroot_path}/etc/X11/xinit/xinitrc fi ;; + rc-update) exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh ;; + fsscript) exec_in_chroot ${clst_fsscript} ;; + clean) if [ "${clst_livecd_type}" = "gentoo-gamecd" ] \ || [ "${clst_livecd_type}" = "gentoo-release-minimal" ] \ @@ -112,6 +118,7 @@ case $1 in grep -v 'libgcc_eh.a' | xargs rm -f rm -f ${clst_chroot_path}/tmp/packages.txt ;; + bootloader) shift # Here is where we poke in our identifier @@ -184,15 +191,18 @@ case $1 in ${clst_sharedir}/targets/support/bootloader-setup.sh $1 ;; + unmerge) shift export clst_packages="$*" exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh ;; + target_image_setup) shift ${clst_sharedir}/targets/support/target_image_setup.sh $1 ;; + iso) shift ${clst_sharedir}/targets/support/create-iso.sh $1 diff --git a/targets/netboot/netboot-combine.sh b/targets/netboot/netboot-combine.sh index 7983e129..e4294ca0 100644 --- a/targets/netboot/netboot-combine.sh +++ b/targets/netboot/netboot-combine.sh @@ -53,7 +53,7 @@ do alpha) # Until aboot is patched this is broken currently. # please use catalyst 1.1.5 or older - + #TEST TEST TEST TEST #http://lists.debian.org/debian-alpha/2004/07/msg00094.html #make \ diff --git a/targets/netboot/netboot-controller.sh b/targets/netboot/netboot-controller.sh index 6352d7a2..edf1f21a 100644 --- a/targets/netboot/netboot-controller.sh +++ b/targets/netboot/netboot-controller.sh @@ -13,6 +13,7 @@ case ${1} in exec_in_chroot \ ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; + busybox) # Custom busybox config support if [ -f "${clst_netboot_busybox_config}" ] @@ -20,7 +21,7 @@ case ${1} in mkdir -p ${clst_chroot_path}/etc/busybox/${clst_CHOST} cp -v ${clst_netboot_busybox_config} \ ${clst_chroot_path}/etc/busybox/${clst_CHOST}/busybox.config - clst_use="savedconfig" + clst_use="savedconfig" fi # Main Busybox emerge @@ -31,14 +32,17 @@ case ${1} in exec_in_chroot \ ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; + pre-kmerge) # Sets up the build environment before any kernels are compiled #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh ;; + post-kmerge) # Cleans up the build environment after the kernels are compiled #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh ;; + kernel) shift export clst_kname="$1" @@ -48,6 +52,7 @@ case ${1} in #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh #extract_kernels kernels ;; + image) #Creates the base initrd image for the netboot shift @@ -62,11 +67,14 @@ case ${1} in exec_in_chroot \ ${clst_sharedir}/targets/${clst_target}/${clst_target}-image.sh ;; + finish) ${clst_sharedir}/targets/${clst_target}/${clst_target}-combine.sh ;; + clean) exit 0;; + *) exit 1;; esac diff --git a/targets/netboot/netboot-image.sh b/targets/netboot/netboot-image.sh index 90bb704a..10bdaed3 100644 --- a/targets/netboot/netboot-image.sh +++ b/targets/netboot/netboot-image.sh @@ -7,7 +7,7 @@ update_env_settings echo "Copying files to ${clst_root_path}" clst_files="/bin/busybox ${clst_files} " for f in ${clst_files} -do +do copy_file ${f} done echo "Done copying files" diff --git a/targets/netboot2/netboot2-controller.sh b/targets/netboot2/netboot2-controller.sh index 03e4db4a..2ffcb0d7 100644 --- a/targets/netboot2/netboot2-controller.sh +++ b/targets/netboot2/netboot2-controller.sh @@ -12,14 +12,17 @@ case ${1} in exec_in_chroot \ ${clst_sharedir}/targets/${clst_target}/${clst_target}-pkg.sh ;; + pre-kmerge) # Sets up the build environment before any kernels are compiled exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh ;; + post-kmerge) # Cleans up the build environment after the kernels are compiled exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh ;; + kernel) shift export clst_kname="$1" @@ -44,6 +47,7 @@ case ${1} in #16:13 <@solar> eval clst_boot_kernel_${kernel_name}_config=bar #16:13 <@solar> eval echo \$clst_boot_kernel_${kernel_name}_config ;; + image) # Creates the base initramfs image for the netboot echo -e ">>> Preparing Image ..." @@ -54,13 +58,16 @@ case ${1} in exec_in_chroot \ ${clst_sharedir}/targets/${clst_target}/${clst_target}-copyfile.sh ;; + final) # For each arch, fetch the kernel images and put them in builds/ echo -e ">>> Copying completed kernels to ${clst_target_path} ..." ${clst_sharedir}/targets/support/netboot2-final.sh ;; + clean) exit 0;; + *) exit 1;; esac diff --git a/targets/netboot2/netboot2-copyfile.sh b/targets/netboot2/netboot2-copyfile.sh index 1d0290e2..cc1a1181 100644 --- a/targets/netboot2/netboot2-copyfile.sh +++ b/targets/netboot2/netboot2-copyfile.sh @@ -7,7 +7,7 @@ update_env_settings echo ">>> Copying initramfs files to ${clst_merge_path} (in chroot) ..." [ ! -d "${clst_merge_path}" ] && mkdir -p ${clst_merge_path} for f in ${clst_files} -do +do # copy it to the merge path cp -pPRf --parents $(eval echo ${f}) ${clst_merge_path} diff --git a/targets/stage1/stage1-controller.sh b/targets/stage1/stage1-controller.sh index a07e2f03..58da8e41 100644 --- a/targets/stage1/stage1-controller.sh +++ b/targets/stage1/stage1-controller.sh @@ -5,6 +5,7 @@ source ${clst_sharedir}/targets/support/functions.sh case $1 in enter) ;; + run) cp ${clst_sharedir}/targets/stage1/build.py ${clst_chroot_path}/tmp @@ -20,9 +21,11 @@ case $1 in ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh \ || exit 1 ;; + preclean) exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh /tmp/stage1root || exit 1 ;; + clean) # Clean out man, info and doc files rm -rf usr/share/{man,doc,info}/* @@ -34,6 +37,7 @@ case $1 in grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | \ grep -v 'libgcc_eh.a' | xargs rm -f ;; + *) exit 1 ;; diff --git a/targets/stage2/stage2-chroot.sh b/targets/stage2/stage2-chroot.sh index 109d4af1..61f52616 100644 --- a/targets/stage2/stage2-chroot.sh +++ b/targets/stage2/stage2-chroot.sh @@ -19,4 +19,3 @@ fi ## START BUILD /usr/portage/scripts/bootstrap.sh ${bootstrap_opts} || exit 1 - diff --git a/targets/stage2/stage2-controller.sh b/targets/stage2/stage2-controller.sh index ee41687a..2192fbc5 100644 --- a/targets/stage2/stage2-controller.sh +++ b/targets/stage2/stage2-controller.sh @@ -8,18 +8,22 @@ case $1 in enter) ${clst_CHROOT} ${clst_chroot_path} ;; + run) shift export clst_packages="$*" exec_in_chroot \ ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; + preclean) exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path} ;; + clean) exit 0 ;; + *) exit 1 ;; diff --git a/targets/stage3/stage3-controller.sh b/targets/stage3/stage3-controller.sh index 81aeda7c..edf42ecd 100644 --- a/targets/stage3/stage3-controller.sh +++ b/targets/stage3/stage3-controller.sh @@ -8,17 +8,21 @@ case $1 in enter) ${clst_CHROOT} ${clst_chroot_path} ;; + run) shift export clst_packages="$*" exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; + preclean) exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path} ;; + clean) exit 0 ;; + *) exit 1 ;; diff --git a/targets/stage4/stage4-controller.sh b/targets/stage4/stage4-controller.sh index b056ade7..ff8dc038 100644 --- a/targets/stage4/stage4-controller.sh +++ b/targets/stage4/stage4-controller.sh @@ -8,14 +8,17 @@ case $1 in enter) ${clst_CHROOT} ${clst_chroot_path} ;; + pre-kmerge) # Sets up the build environment before any kernels are compiled exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh ;; + post-kmerge) # Cleans up the build environment after the kernels are compiled exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh ;; + kernel) shift export clst_kname="$1" @@ -30,20 +33,25 @@ case $1 in # Do we need this one? # extract_kernel ${clst_chroot_path}/boot ${clst_kname} ;; + build_packages) shift export clst_packages="$*" exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh ;; + preclean) exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path} ;; + rc-update) exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh ;; + fsscript) exec_in_chroot ${clst_fsscript} ;; + livecd-update) # Now, finalize and tweak the livecd fs (inside of the chroot) exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh @@ -56,25 +64,31 @@ case $1 in ${clst_chroot_path}/etc/X11/xinit/xinitrc fi ;; + bootloader) exit 0 ;; + target_image_setup) shift ${clst_sharedir}/targets/support/target_image_setup.sh $1 ;; + unmerge) shift export clst_packages="$*" - exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh + exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh ;; + iso) shift ${clst_sharedir}/targets/support/create-iso.sh $1 ;; + clean) exit 0 ;; + *) exit 1 ;; diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index 2832b9ff..a0bc5f58 100644 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -1,4 +1,5 @@ #!/bin/bash + source ${clst_sharedir}/targets/support/functions.sh source ${clst_sharedir}/targets/support/filesystem-functions.sh diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 4da932fa..18e7a382 100644 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -239,7 +239,7 @@ make_destpath() { # ROOT is / by default, so remove any ROOT= settings from make.conf sed -i '/ROOT=/d' /etc/portage/make.conf export ROOT=/ - if [ "${1}" != "/" -a -n "${1}" ] + if [ "${1}" != "/" -a -n "${1}" ] then echo "ROOT=\"${1}\"" >> /etc/portage/make.conf export ROOT=${1} diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh index 922e547c..af8a793f 100644 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -207,7 +207,7 @@ case ${clst_hostarch} in # should be in the cdtar, otherwise use the new style. if [ -x ${clst_target_path}/boot/mkisofs.sparc.fu ] then - mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp + mv ${clst_target_path}/boot/mkisofs.sparc.fu /tmp echo "Running mkisofs.sparc.fu to create iso image...." echo "/tmp/mkisofs.sparc.fu ${mkisofs_zisofs_opts} -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V \"${clst_iso_volume_id}\" ${clst_target_path}" /tmp/mkisofs.sparc.fu ${mkisofs_zisofs_opts} -o ${1} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V "${clst_iso_volume_id}" ${clst_target_path} || die "Cannot make ISO image" @@ -283,7 +283,7 @@ case ${clst_hostarch} in elif [ -e ${clst_target_path}/gentoo.efimg ] then echo 'Creating ISO using EFI bootloader' - echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path}" + echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path}" mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} -b gentoo.efimg -c boot.cat -no-emul-boot ${clst_target_path} || die "Cannot make ISO image" else echo "mkisofs -J -R -l ${mkisofs_zisofs_opts} -V \"${clst_iso_volume_id}\" -o ${1} ${clst_target_path}" diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh index 31ad6d35..98fd5fe3 100644 --- a/targets/support/filesystem-functions.sh +++ b/targets/support/filesystem-functions.sh @@ -27,7 +27,7 @@ create_normal_loop() { || die "Couldn't mount loopback ext2 filesystem" sync; sync; sleep 3 # Try to work around 2.6.0+ loopback bug echo "cp -pPR ${source_path}/* ${destination_path}/loopmount" - cp -pPR ${source_path}/* ${destination_path}/loopmount + cp -pPR ${source_path}/* ${destination_path}/loopmount [ $? -ne 0 ] && { umount ${destination_path}/${loopname}; \ die "Couldn't copy files to loopback ext2 filesystem"; } umount ${destination_path}/loopmount \ diff --git a/targets/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh index 6bdaaaa0..4ebc2cc3 100644 --- a/targets/tinderbox/tinderbox-chroot.sh +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -8,7 +8,7 @@ setup_pkgmgr # Backup pristine system rsync -avx --exclude "/root/" --exclude "/tmp/" --exclude "/usr/portage/" / \ - /tmp/rsync-bak/ + /tmp/rsync-bak/ for x in ${clst_tinderbox_packages} do @@ -30,7 +30,7 @@ do if [ "$?" != "0" ] then - echo "! $x" >> /tmp/tinderbox.log + echo "! $x" >> /tmp/tinderbox.log else echo "$x" >> /tmp/tinderbox.log fi -- 2.26.2