From 75a250a1bef09901640dc579fdc7cb6be341f078 Mon Sep 17 00:00:00 2001 From: "Jorge Manuel B. S. Vicetto (jmbsvicetto)" Date: Tue, 21 Aug 2012 01:03:58 +0000 Subject: [PATCH] Whitespace. --- targets/support/bootloader-setup.sh | 22 +++++++++++----------- targets/support/chroot-functions.sh | 9 ++++----- targets/support/create-iso.sh | 4 ++-- targets/support/functions.sh | 18 +++++++++--------- targets/support/kill-chroot-pids.sh | 10 +++++----- targets/support/kmerge.sh | 18 +++++++++--------- targets/support/livecdfs-update.sh | 2 +- targets/support/mips-arcload_conf.sh | 2 +- targets/support/rc-update.sh | 1 - 9 files changed, 42 insertions(+), 44 deletions(-) diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index 59f1abe9..2fa44e03 100644 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -64,27 +64,27 @@ case ${clst_hostarch} in echo "fgcolor=white" >> ${icfg} echo "bgcolor=black" >> ${icfg} echo "message=/boot/boot.msg" >> ${icfg} - + # Here is where I fix up the boot.msg file. sed -e 's/ARCH/PowerPC/' \ -e 's/HARDWARE/Apple and IBM hardware/' \ -i $kmsg - # Setup the IBM yaboot.conf + # Setup the IBM yaboot.conf etc_icfg=$1/etc/yaboot.conf - mkdir -p $1/etc + mkdir -p $1/etc IBM_YABOOT="FALSE" echo "root=/dev/ram" >> ${etc_icfg} echo "fgcolor=white" >> ${etc_icfg} echo "bgcolor=black" >> ${etc_icfg} echo "message=/boot/boot.msg" >> ${etc_icfg} - + for x in ${clst_boot_kernel} - do + do eval "clst_kernel_console=\$clst_boot_kernel_${x}_console" eval "clst_kernel_machine_type=\$clst_boot_kernel_${x}_machine_type" eval custom_kopts=\$${x}_kernelopts - + echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" if [ "${clst_kernel_machine_type}" == "ibm" ] then @@ -147,7 +147,7 @@ case ${clst_hostarch} in echo "label=${x}" >> ${icfg} echo "read-write" >> ${icfg} echo "append=\"${default_append_line}\"" >> ${icfg} - + for y in ${clst_kernel_console} do echo >> ${icfg} @@ -179,7 +179,7 @@ case ${clst_hostarch} in done if [ "${IBM_YABOOT}" == "FALSE" ] - then + then rm ${etc_kmsg} rmdir $1/etc if [ -d $1/ppc ] @@ -280,7 +280,7 @@ case ${clst_hostarch} in eval custom_kopts=\$${x}_kernelopts echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" echo >> ${icfg} - + eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel" if [ -n "${clst_kernel_softlevel}" ] @@ -375,9 +375,9 @@ case ${clst_hostarch} in eval custom_kopts=\$${x}_kernelopts echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}" echo >> ${icfg} - + eval "clst_kernel_softlevel=\$clst_boot_kernel_${x}_softlevel" - + if [ -n "${clst_kernel_softlevel}" ] then for y in ${clst_kernel_softlevel} diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 78db5ec4..12597a32 100644 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -251,8 +251,8 @@ run_merge() { # Sets up the ROOT= parameter # with no options ROOT=/ make_destpath ${clst_root_path} - - export EMERGE_WARNING_DELAY=0 + + export EMERGE_WARNING_DELAY=0 export CLEAN_DELAY=0 export EBEEP_IGNORE=0 export EPAUSE_IGNORE=0 @@ -349,7 +349,7 @@ function copy_symlink() { STACK=${2} [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 )) - if [ ${STACK} -le 0 ] + if [ ${STACK} -le 0 ] then echo "WARNING : ${TARGET} : too many levels of symbolic links !" return @@ -359,7 +359,7 @@ function copy_symlink() { mkdir -p ${clst_root_path}/`dirname ${1}` [ ! -e ${clst_root_path}/${1} ] && \ cp -vfdp ${1} ${clst_root_path}/${1} - + if [[ -n $(type -p realpath) ]]; then TARGET=`realpath ${1}` else @@ -412,4 +412,3 @@ Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop # We do this everywhere, so why not put it in this script run_default_funcs - diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh index c525a398..06a1a757 100644 --- a/targets/support/create-iso.sh +++ b/targets/support/create-iso.sh @@ -284,8 +284,8 @@ case ${clst_hostarch} in 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}" - 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 + 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}" mkisofs -J -R -l ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o ${1} ${clst_target_path} || die "Cannot make ISO image" fi diff --git a/targets/support/functions.sh b/targets/support/functions.sh index 429485b3..0bc5d69c 100644 --- a/targets/support/functions.sh +++ b/targets/support/functions.sh @@ -37,14 +37,14 @@ exec_in_chroot(){ chroot_path=${clst_chroot_path}${subdir} copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \ ${subdir}/tmp/ - echo "Running ${file_name} in chroot ${chroot_path}" + echo "Running ${file_name} in chroot ${chroot_path}" ${clst_CHROOT} ${chroot_path} /tmp/${file_name} || exit 1 else copy_to_chroot ${1} tmp/ chroot_path=${clst_chroot_path} copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \ tmp/ - echo "Running ${file_name} in chroot ${chroot_path}" + echo "Running ${file_name} in chroot ${chroot_path}" ${clst_CHROOT} ${chroot_path}/ /tmp/${file_name} || exit 1 fi @@ -97,12 +97,12 @@ extract_kernels() { [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" mkdir -p ${1}/ - tar xjf ${kbinary} -C ${1}/ + tar xjf ${kbinary} -C ${1}/ # change config name from "config-*" to "gentoo", for example #mv ${1}/config-* ${1}/${x}-config - rm ${1}/config-* - + rm ${1}/config-* + # change kernel name from "kernel" to "gentoo", for example if [ -e ${1}/kernel-* ] then @@ -117,12 +117,12 @@ extract_kernels() { # change initrd name from "initrd" to "gentoo.igz", for example if [ -e ${1}/initrd-* ] - then + then mv ${1}/initrd-* ${1}/${x}.igz fi if [ -e ${1}/initramfs-* ] - then + then mv ${1}/initramfs-* ${1}/${x}.igz fi @@ -135,7 +135,7 @@ extract_kernels() { extract_modules() { # $1 = Destination - # $2 = kname + # $2 = kname kmodules="${clst_chroot_path}/tmp/kerncache/${2}-modules-${clst_version_stamp}.tar.bz2" if [ -f "${kmodules}" ] @@ -208,7 +208,7 @@ check_filesystem_type(){ cmdline_opts="${cmdline_opts} looptype=cramfs loop=/image.cramfs" ;; esac -} +} run_crossdev() { crossdev ${clst_CHOST} diff --git a/targets/support/kill-chroot-pids.sh b/targets/support/kill-chroot-pids.sh index 9e8bf01d..ea8ee402 100644 --- a/targets/support/kill-chroot-pids.sh +++ b/targets/support/kill-chroot-pids.sh @@ -41,17 +41,17 @@ then echo echo "Killing process(es)" echo "pid: process name" - for pid in ${pids[@]} - do + for pid in ${pids[@]} + do P_NAME=$(ls -la --color=never /proc/${pid} 2>&1 |grep exe|grep ${clst_chroot_path}|awk '{print $11}') echo ${pid}: ${P_NAME} done - echo + echo echo "Press Ctrl-C within 10 seconds to abort" - + sleep 10 - for pid in ${pids[@]} + for pid in ${pids[@]} do kill -9 ${pid} done diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh index f57508f4..b7313738 100644 --- a/targets/support/kmerge.sh +++ b/targets/support/kmerge.sh @@ -49,7 +49,7 @@ setup_gk_args() { then GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc" fi - + if [ -n "${clst_linuxrc}" ] then GK_ARGS="${GK_ARGS} --linuxrc=/tmp/linuxrc" @@ -77,7 +77,7 @@ genkernel_compile(){ setup_gk_args #echo "The GK_ARGS are" - #echo ${GK_ARGS} + #echo ${GK_ARGS} export clst_kernel_merge export clst_initramfs_overlay # Build our list of kernel packages @@ -141,15 +141,15 @@ fi # USE variables (and thus different patches enabled/disabled.) Also, there's no # real benefit in using the pkgcache for kernel source ebuilds. -USE_MATCH=0 +USE_MATCH=0 if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ] then STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort) STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort) if [ "${STR1}" = "${STR2}" ] - then + then #echo "USE Flags match" - USE_MATCH=1 + USE_MATCH=1 else if [ -n "${clst_KERNCACHE}" ] then @@ -167,7 +167,7 @@ then STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION` STR2=${clst_kextraversion} if [ "${STR1}" = "${STR2}" ] - then + then if [ -n "${clst_KERNCACHE}" ] then #echo "EXTRAVERSION match" @@ -182,7 +182,7 @@ then STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG` STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'` if [ "${STR1}" = "${STR2}" ] - then + then if [ -n "${clst_KERNCACHE}" ] then #echo "CONFIG match" @@ -204,7 +204,7 @@ then mkdir -p /etc/portage/profile echo "${KERNELVERSION}" > /etc/portage/profile/package.provided else - if ( ! grep -q "^${KERNELVERSION}\$" /etc/portage/profile/package.provided ) + if ( ! grep -q "^${KERNELVERSION}\$" /etc/portage/profile/package.provided ) then echo "${KERNELVERSION}" >> /etc/portage/profile/package.provided fi @@ -226,7 +226,7 @@ then echo "Setting extraversion to ${clst_kextraversion}" sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION - else + else touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION fi fi diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh index a7aad5f1..2b41bf63 100644 --- a/targets/support/livecdfs-update.sh +++ b/targets/support/livecdfs-update.sh @@ -178,7 +178,7 @@ fi # touch /etc/asound.state touch /etc/asound.state -# Tweak the MOTD for Gentoo releases +# Tweak the MOTD for Gentoo releases case ${clst_livecd_type} in gentoo-release-universal) cat /etc/generic.motd.txt /etc/universal.motd.txt \ diff --git a/targets/support/mips-arcload_conf.sh b/targets/support/mips-arcload_conf.sh index 29692b4a..cecddd98 100644 --- a/targets/support/mips-arcload_conf.sh +++ b/targets/support/mips-arcload_conf.sh @@ -37,7 +37,7 @@ serial="serial {\n\ dbg="debug {\n\ \tdescription\t\"Debug Shell\";\n\ \timage\t\t\"\";\n\ -\tappend\t\t\"real_root=shell\" \"nox\";\n}\n\n" +\tappend\t\t\"real_root=shell\" \"nox\";\n}\n\n" cmt1="comment\t\t\"\\\n\\\n\";\n\ comment\t\t\"Bootable Images & Options:\\\n\\\r\\\n\\\r\";\n" diff --git a/targets/support/rc-update.sh b/targets/support/rc-update.sh index 50c1da2c..c3e8ed9c 100644 --- a/targets/support/rc-update.sh +++ b/targets/support/rc-update.sh @@ -66,4 +66,3 @@ then done fi fi - -- 2.26.2