From f2734daf0a9519db6b303683d3ac413a20d56e2a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 24 Sep 2007 08:47:42 +0200 Subject: Replacing backticks with POSIX expression. --- debian/cron.daily | 12 +++--- debian/default | 4 +- examples/cron/etch.sh | 16 ++++---- examples/cron/lenny.sh | 16 ++++---- examples/cron/manpages.sh | 12 +++--- examples/cron/sid.sh | 16 ++++---- examples/cron/snapshots.sh | 22 +++++------ functions/architecture.sh | 4 +- functions/arguments.sh | 2 +- functions/common.sh | 2 +- functions/defaults.sh | 30 +++++++-------- functions/lockfile.sh | 2 +- functions/packages.sh | 2 +- functions/packageslists.sh | 2 +- functions/stagefile.sh | 10 ++--- helpers/lh_binary_chroot | 2 +- helpers/lh_binary_debian-installer | 44 ++++++++++----------- helpers/lh_binary_disk | 18 ++++----- helpers/lh_binary_grub | 30 +++++++-------- helpers/lh_binary_includes | 12 +++--- helpers/lh_binary_net | 10 ++--- helpers/lh_binary_rootfs | 12 +++--- helpers/lh_binary_syslinux | 72 +++++++++++++++++------------------ helpers/lh_binary_usb-hdd | 12 +++--- helpers/lh_binary_yaboot | 24 ++++++------ helpers/lh_bootstrap_cache | 4 +- helpers/lh_bootstrap_cdebootstrap | 4 +- helpers/lh_bootstrap_copy | 2 +- helpers/lh_bootstrap_debootstrap | 4 +- helpers/lh_chroot_cache | 4 +- helpers/lh_chroot_hacks | 4 +- helpers/lh_chroot_local-hooks | 8 ++-- helpers/lh_chroot_local-packageslists | 8 ++-- helpers/lh_chroot_sources | 12 +++--- helpers/lh_chroot_sysvinit | 2 +- helpers/lh_config | 4 +- helpers/lh_losetup | 8 ++-- helpers/lh_source_debian | 6 +-- helpers/lh_source_debian-live | 2 +- helpers/lh_source_disk | 12 +++--- helpers/lh_source_usb-hdd | 6 +-- helpers/lh_testroot | 2 +- hooks/mini | 2 +- hooks/minimal | 2 +- 44 files changed, 242 insertions(+), 242 deletions(-) diff --git a/debian/cron.daily b/debian/cron.daily index a5febe5..c26168a 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -35,7 +35,7 @@ else exit 1 fi -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin daily build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin daily build." >> /var/log/live for ARCHITECTURE in ${ARCHITECTURES} do @@ -49,13 +49,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config -b iso -s tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.iso ] && [ -f "${TEMPDIR}"/debian-live/source.tar ] @@ -90,13 +90,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config -b usb-hdd -s tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.img ] @@ -151,4 +151,4 @@ done rm -f "${DESTDIR}"/"${BUILD}"-builds/current ln -s ${DATE} "${DESTDIR}"/"${BUILD}"-builds/current -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end daily build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end daily build." >> /var/log/live diff --git a/debian/default b/debian/default index 0ca9a27..d92aae4 100644 --- a/debian/default +++ b/debian/default @@ -2,13 +2,13 @@ AUTOBUILD="disabled" -DATE="`date +%Y%m%d`" +DATE="$(date +%Y%m%d)" DESTDIR="/srv/debian-live" TEMPDIR="/srv/tmp/live-helper" OPTIONS="--binary-indices disabled" -ARCHITECTURES="`dpkg --print-architecture`" +ARCHITECTURES="$(dpkg --print-architecture)" DISTRIBUTIONS="sid" MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/" MIRROR_BOOTSTRAP_SECURITY="http://security.debian.org/" diff --git a/examples/cron/etch.sh b/examples/cron/etch.sh index 3b9842c..aefdbae 100755 --- a/examples/cron/etch.sh +++ b/examples/cron/etch.sh @@ -7,13 +7,13 @@ BUILD="monthly" # Begin custom defaults AUTOBUILD="enabled" -DATE="`date +%Y%m%d`" +DATE="$(date +%Y%m%d)" DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" OPTIONS="--initramfs casper --apt-recommends disabled" -ARCHITECTURES="`dpkg --print-architecture`" +ARCHITECTURES="$(dpkg --print-architecture)" DISTRIBUTIONS="etch" MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" @@ -53,7 +53,7 @@ else exit 1 fi -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin ${BUILD} build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin ${BUILD} build." >> /var/log/live for ARCHITECTURE in ${ARCHITECTURES} do @@ -67,13 +67,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config --binary-images iso --source-images tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.iso ] && [ -f "${TEMPDIR}"/debian-live/source.tar.gz ] @@ -108,13 +108,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config --binary-images usb-hdd --source-images tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.img ] @@ -169,4 +169,4 @@ done rm -f "${DESTDIR}"/"${BUILD}"-builds/current ln -s ${DATE} "${DESTDIR}"/"${BUILD}"-builds/current -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end ${BUILD} build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end ${BUILD} build." >> /var/log/live diff --git a/examples/cron/lenny.sh b/examples/cron/lenny.sh index cdec0d1..eb78ffe 100755 --- a/examples/cron/lenny.sh +++ b/examples/cron/lenny.sh @@ -7,13 +7,13 @@ BUILD="weekly" # Begin custom defaults AUTOBUILD="enabled" -DATE="`date +%Y%m%d`" +DATE="$(date +%Y%m%d)" DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" OPTIONS="--apt-recommends disabled --security disabled" -ARCHITECTURES="`dpkg --print-architecture`" +ARCHITECTURES="$(dpkg --print-architecture)" DISTRIBUTIONS="lenny" MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" @@ -53,7 +53,7 @@ else exit 1 fi -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin ${BUILD} build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin ${BUILD} build." >> /var/log/live for ARCHITECTURE in ${ARCHITECTURES} do @@ -67,13 +67,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config --binary-images iso --source-images tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.iso ] && [ -f "${TEMPDIR}"/debian-live/source.tar.gz ] @@ -108,13 +108,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config --binary-images usb-hdd --source-images tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.img ] @@ -169,4 +169,4 @@ done rm -f "${DESTDIR}"/"${BUILD}"-builds/current ln -s ${DATE} "${DESTDIR}"/"${BUILD}"-builds/current -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end ${BUILD} build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end ${BUILD} build." >> /var/log/live diff --git a/examples/cron/manpages.sh b/examples/cron/manpages.sh index cac2b70..cd65dc4 100755 --- a/examples/cron/manpages.sh +++ b/examples/cron/manpages.sh @@ -8,7 +8,7 @@ PACKAGES="live-helper live-initramfs" TEMPDIR="/srv/tmp/manpages" SERVER="/srv/debian-live/www/other/manpages" -DATE_START="`date -R`" +DATE_START="$(date -R)" # Checking lock file if [ -f "${SERVER}"/lock ] @@ -29,7 +29,7 @@ trap "test -f ${SERVER}/lock && rm -f ${SERVER}/lock; exit 0" 0 1 2 3 9 15 # Creating lock file echo "${DATE_START}" > "${SERVER}"/lock -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin manpage build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin manpage build." >> /var/log/live # Remove old manpages rm -f "${SERVER}"/*.html @@ -66,7 +66,7 @@ do -e 's#HREF="../man8/#HREF="#g' \ -e 's#HREF="../man9/#HREF="#g' \ -e 's#/cgi-bin/man/man2html#http://packages.debian.org/man2html#' \ - > "${SERVER}"/`basename ${MANPAGE}`.html + > "${SERVER}"/$(basename ${MANPAGE}).html done # Removing sources @@ -82,7 +82,7 @@ do do if [ -f "${MANPAGE}" ] then - ln -s `basename ${MANPAGE}` "${SERVER}"/`basename ${MANPAGE} .en.${NUMBER}.html`.${NUMBER}.html + ln -s $(basename ${MANPAGE}) "${SERVER}"/$(basename ${MANPAGE} .en.${NUMBER}.html).${NUMBER}.html fi done done @@ -90,10 +90,10 @@ done # Writing timestamp cat > "${SERVER}"/LAST_BUILD << EOF Last run begin: ${DATE_START} -Last run end: `date -R` +Last run end: $(date -R) EOF # Removing build directory rm -rf "${TEMPDIR}" -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end manpage build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end manpage build." >> /var/log/live diff --git a/examples/cron/sid.sh b/examples/cron/sid.sh index 4068922..d0230fe 100755 --- a/examples/cron/sid.sh +++ b/examples/cron/sid.sh @@ -7,13 +7,13 @@ BUILD="daily" # Begin custom defaults AUTOBUILD="enabled" -DATE="`date +%Y%m%d`" +DATE="$(date +%Y%m%d)" DESTDIR="/srv/debian-live/www/cdimage" TEMPDIR="/srv/tmp/live-helper" OPTIONS="--apt-recommends disabled" -ARCHITECTURES="`dpkg --print-architecture`" +ARCHITECTURES="$(dpkg --print-architecture)" DISTRIBUTIONS="sid" MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/" MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/" @@ -53,7 +53,7 @@ else exit 1 fi -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin ${BUILD} build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin ${BUILD} build." >> /var/log/live for ARCHITECTURE in ${ARCHITECTURES} do @@ -67,13 +67,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config --binary-images iso --source-images tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source enabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.iso ] && [ -f "${TEMPDIR}"/debian-live/source.tar.gz ] @@ -108,13 +108,13 @@ do mkdir -p "${TEMPDIR}"/debian-live cd "${TEMPDIR}"/debian-live - echo "Begin: `date -R`" > "${TEMPDIR}"/debian-live/log.txt + echo "Begin: $(date -R)" > "${TEMPDIR}"/debian-live/log.txt # Generating images lh_config --binary-images usb-hdd --source-images tar --distribution ${DISTRIBUTION} --packages-lists ${PACKAGES_LIST} --mirror-bootstrap ${MIRROR_BOOTSTRAP} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY} --mirror-binary ${MIRROR_BINARY} --mirror-binary-security ${MIRROR_BINARY_SECURITY} --source disabled ${OPTIONS} lh_build >> "${TEMPDIR}"/debian-live/log.txt 2>&1 - echo "End: `date -R`" >> "${TEMPDIR}"/debian-live/log.txt + echo "End: $(date -R)" >> "${TEMPDIR}"/debian-live/log.txt fi if [ -f "${TEMPDIR}"/debian-live/binary.img ] @@ -169,4 +169,4 @@ done rm -f "${DESTDIR}"/"${BUILD}"-builds/current ln -s ${DATE} "${DESTDIR}"/"${BUILD}"-builds/current -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end ${BUILD} build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end ${BUILD} build." >> /var/log/live diff --git a/examples/cron/snapshots.sh b/examples/cron/snapshots.sh index 74ffaea..2642646 100755 --- a/examples/cron/snapshots.sh +++ b/examples/cron/snapshots.sh @@ -15,7 +15,7 @@ export DEBEMAIL EMAIL DEBFULLNAME NAME TEMPDIR="/srv/tmp/snapshots" SERVER="/srv/debian-unofficial/ftp/debian-live-snapshots" -DATE_START="`date -R`" +DATE_START="$(date -R)" # Checking lock file if [ -f "${SERVER}"/Archive-Update-in-Progress ] @@ -36,7 +36,7 @@ trap "test -f ${SERVER}/Archive-Update-in-Progress && rm -f ${SERVER}/Archive-Up # Creating lock file echo "${DATE_START}" > "${SERVER}"/Archive-Update-in-Progress -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: begin snapshot build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: begin snapshot build." >> /var/log/live # Processing packages for PACKAGE in ${PACKAGES} @@ -56,12 +56,12 @@ do # Getting version cd "${TEMPDIR}"/${PACKAGE} - VERSION="`dpkg-parsechangelog | awk '/Version:/ { print $2 }' | awk -F- '{ print $1 }'`" + VERSION="$(dpkg-parsechangelog | awk '/Version:/ { print $2 }' | awk -F- '{ print $1 }')" # Getting revision cd "${TEMPDIR}"/${PACKAGE} - REVISION="`git log | grep -m1 Date | awk -FDate: '{ print $2 }' | sed -e 's/+.*$//'`" - REVISION="`date -d "${REVISION}" +%Y%m%d.%H%M%S`" + REVISION="$(git log | grep -m1 Date | awk -FDate: '{ print $2 }' | sed -e 's/+.*$//')" + REVISION="$(date -d "${REVISION}" +%Y%m%d.%H%M%S)" # Check for existing package if [ ! -f "${SERVER}"/${PACKAGE}_${VERSION}~${REVISION}.dsc ] || [ "${1}" = "--force" ] @@ -86,7 +86,7 @@ do # Removing old packages if [ -f "${SERVER}"/"${PACKAGE}"*.changes ] then - for FILE in `awk {'print $5'} "${SERVER}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$"` + for FILE in $(awk {'print $5'} "${SERVER}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$") do rm -f "${SERVER}"/"${FILE}" done @@ -95,7 +95,7 @@ do rm -f "${SERVER}"/"${PACKAGE}"*.changes # Installing new packages - for FILE in `awk {'print $5'} "${TEMPDIR}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$"` + for FILE in $(awk {'print $5'} "${TEMPDIR}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$") do mv "${TEMPDIR}"/"${FILE}" "${SERVER}" done @@ -109,7 +109,7 @@ done if [ "${UPDATE_INDICES}" = "true" ] then - LAST_UPDATE="`date -R`" + LAST_UPDATE="$(date -R)" cd "${SERVER}" @@ -125,13 +125,13 @@ fi # Reading timestamp if [ -z "${LAST_UPDATE}" ] then - LAST_UPDATE="`awk -F: '/Last update:/ { print $2":"$3":"$4 }' ${SERVER}/LAST_BUILD | sed -e 's/ //'`" + LAST_UPDATE="$(awk -F: '/Last update:/ { print $2":"$3":"$4 }' ${SERVER}/LAST_BUILD | sed -e 's/ //')" fi # Writing timestamp cat > "${SERVER}"/LAST_BUILD << EOF Last run begin: ${DATE_START} -Last run end: `date -R` +Last run end: $(date -R) Last update: ${LAST_UPDATE} EOF @@ -139,4 +139,4 @@ EOF # Removing build directory rm -rf "${TEMPDIR}" -echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-helper: end snapshot build." >> /var/log/live +echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-helper: end snapshot build." >> /var/log/live diff --git a/functions/architecture.sh b/functions/architecture.sh index 4c21458..d9c84f8 100755 --- a/functions/architecture.sh +++ b/functions/architecture.sh @@ -16,7 +16,7 @@ Check_architecture () for ARCHITECTURE in ${ARCHITECTURES} do - if [ "`echo ${LH_ARCHITECTURE} | grep ${ARCHITECTURE}`" ] + if [ "$(echo ${LH_ARCHITECTURE} | grep ${ARCHITECTURE})" ] then VALID="true" break @@ -32,7 +32,7 @@ Check_architecture () Check_multiarchitecture () { - if [ "`echo ${LH_ARCHITECTURE} | wc -w`" -gt "1" ] + if [ "$(echo ${LH_ARCHITECTURE} | wc -w)" -gt "1" ] then # First, only support multiarch on iso if [ "${LH_BINARY_IMAGES}" = "iso" ] diff --git a/functions/arguments.sh b/functions/arguments.sh index 3080f25..7873353 100755 --- a/functions/arguments.sh +++ b/functions/arguments.sh @@ -11,7 +11,7 @@ set -e Arguments () { - ARGUMENTS="`getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}"`" + ARGUMENTS="$(getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")" if [ "${?}" != "0" ] then diff --git a/functions/common.sh b/functions/common.sh index e3ec382..a01de6a 100755 --- a/functions/common.sh +++ b/functions/common.sh @@ -9,5 +9,5 @@ set -e -PROGRAM="`basename ${0}`" +PROGRAM="$(basename ${0})" VERSION="1.0~a30" diff --git a/functions/defaults.sh b/functions/defaults.sh index 4ed1c9f..5d971d8 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -18,7 +18,7 @@ Set_defaults () then if [ -x /usr/bin/lsb_release ] then - case "`lsb_release --short --id`" in + case "$(lsb_release --short --id)" in Debian) LH_MODE="debian" ;; @@ -102,7 +102,7 @@ Set_defaults () LH_APT_SECURE="${LH_APT_SECURE:-enabled}" # Setting bootstrap program - if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "`which ${LH_BOOTSTRAP}`" ] + if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "$(which ${LH_BOOTSTRAP})" ] then case "${LH_MODE}" in debian|debian-edu) @@ -211,7 +211,7 @@ Set_defaults () fi fi - if [ "`id -u`" = "0" ] + if [ "$(id -u)" = "0" ] then # If we are root, disable root command LH_ROOT_COMMAND="" @@ -271,7 +271,7 @@ Set_defaults () then if [ -x "/usr/bin/dpkg" ] then - LH_ARCHITECTURE="`dpkg --print-architecture`" + LH_ARCHITECTURE="$(dpkg --print-architecture)" else echo "W: Can't process file /usr/bin/dpkg, setting architecture to i386" LH_ARCHITECTURE="i386" @@ -570,24 +570,24 @@ Set_defaults () ;; gnome-desktop) - LH_PACKAGES_LISTS="`echo ${LH_PACKAGES_LISTS} | sed -e 's/gnome-desktop//'` standard-x11" - LH_TASKS="`echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//'` standard laptop gnome-desktop desktop" + LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/gnome-desktop//') standard-x11" + LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//') standard laptop gnome-desktop desktop" ;; kde-desktop) - LH_PACKAGES_LISTS="`echo ${LH_PACKAGES_LISTS} | sed -e 's/kde-desktop//'` standard-x11" - LH_TASKS="`echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//'` standard laptop kde-desktop desktop" + LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/kde-desktop//') standard-x11" + LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//') standard laptop kde-desktop desktop" ;; xfce-desktop) - LH_PACKAGES_LISTS="`echo ${LH_PACKAGES_LISTS} | sed -e 's/xfce-desktop//'` standard-x11" - LH_TASKS="`echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//'` standard laptop xfce-desktop desktop" + LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/xfce-desktop//') standard-x11" + LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//') standard laptop xfce-desktop desktop" ;; esac done - LH_PACKAGES_LISTS="`echo ${LH_PACKAGES_LISTS} | sed -e 's/ //g'`" - LH_TASKS="`echo ${LH_TASKS} | sed -e 's/ //g'`" + LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/ //g')" + LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/ //g')" # Setting tasks # LH_TASKS @@ -690,15 +690,15 @@ Set_defaults () then case "${LH_MODE}" in debian) - LH_ISO_VOLUME="Debian Live \`date +%Y%m%d-%H:%M\`" + LH_ISO_VOLUME="Debian Live \$(date +%Y%m%d-%H:%M)" ;; debian-edu) - LH_ISO_VOLUME="Debian Edu Live \`date +%Y%m%d-%H:%M\`" + LH_ISO_VOLUME="Debian Edu Live \$(date +%Y%m%d-%H:%M)" ;; ubuntu) - LH_ISO_VOLUME="Ubuntu Live \`date +%Y%m%d-%H:%M\`" + LH_ISO_VOLUME="Ubuntu Live \$(date +%Y%m%d-%H:%M)" ;; esac fi diff --git a/functions/lockfile.sh b/functions/lockfile.sh index e80bf41..1850308 100755 --- a/functions/lockfile.sh +++ b/functions/lockfile.sh @@ -24,7 +24,7 @@ Check_lockfile () Create_lockfile () { FILE="${1}" - DIRECTORY="`dirname ${1}`" + DIRECTORY="$(dirname ${1})" # Creating lock directory mkdir -p "${DIRECTORY}" diff --git a/functions/packages.sh b/functions/packages.sh index 9e10b1d..dadb007 100755 --- a/functions/packages.sh +++ b/functions/packages.sh @@ -89,7 +89,7 @@ Check_installed () INSTALL_STATUS=1 fi else - FILE="`echo ${FILE} | sed -e 's/chroot//'`" + FILE="$(echo ${FILE} | sed -e 's/chroot//')" if [ ! -e "${FILE}" ] then diff --git a/functions/packageslists.sh b/functions/packageslists.sh index f25b5fb..1ef64e3 100755 --- a/functions/packageslists.sh +++ b/functions/packageslists.sh @@ -34,7 +34,7 @@ Expand_packagelist_file () shift shift - for INCLUDE in `sed -ne 's/^# \(.*\)/\1/gp' "${FILE}"`; + for INCLUDE in $(sed -ne 's/^# \(.*\)/\1/gp' "${FILE}"); do Expand_packagelist "${INCLUDE}" "${@}" done diff --git a/functions/stagefile.sh b/functions/stagefile.sh index 647b181..3a6765e 100755 --- a/functions/stagefile.sh +++ b/functions/stagefile.sh @@ -12,7 +12,7 @@ set -e Check_stagefile () { FILE="${1}" - NAME="`basename ${1}`" + NAME="$(basename ${1})" # Checking stage file if [ -f "${FILE}" ] @@ -33,7 +33,7 @@ Check_stagefile () Create_stagefile () { FILE="${1}" - DIRECTORY="`dirname ${1}`" + DIRECTORY="$(dirname ${1})" # Creating stage directory mkdir -p "${DIRECTORY}" @@ -44,9 +44,9 @@ Create_stagefile () Require_stagefile () { - NAME="`basename ${0}`" + NAME="$(basename ${0})" FILES="${@}" - NUMBER="`echo ${@} | wc -w`" + NUMBER="$(echo ${@} | wc -w)" for FILE in ${FILES} do @@ -54,7 +54,7 @@ Require_stagefile () if [ -f ${FILE} ] then CONTINUE="true" - NAME="${NAME} `basename ${FILE}`" + NAME="${NAME} $(basename ${FILE})" fi done diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index c40afc9..f6615e1 100755 --- a/helpers/lh_binary_chroot +++ b/helpers/lh_binary_chroot @@ -80,7 +80,7 @@ ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Creating stage file diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index 6ad8e7b..056d89d 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -232,20 +232,20 @@ if [ -d cache/packages_bootstrap ] then for FILE in cache/packages_bootstrap/*.deb binary.deb/archives/*.deb do - SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`" + SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')" if [ -z "${SOURCE}" ] then - SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`" + SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')" fi case "${SOURCE}" in lib?*) - LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" ;; *) - LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" ;; esac @@ -265,20 +265,20 @@ if ls ../config/binary_local-debs/*.deb > /dev/null 2>&1 then for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb ../config/binary_local-debs/*_all.deb do - SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`" + SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')" if [ -z "${SOURCE}" ] then - SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`" + SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')" fi case "${SOURCE}" in lib?*) - LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" ;; *) - LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" ;; esac @@ -309,15 +309,15 @@ wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/dists/"${LH_DISTRIBUTION}"/main/de gunzip -c Packages.gz > Packages # Sorting udebs -UDEBS="`awk '/Filename: / { print $2 }' Packages`" +UDEBS="$(awk '/Filename: / { print $2 }' Packages)" # Downloading udebs for UDEB in ${UDEBS} do - if [ -f ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ] + if [ -f ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ] then # Copying cached udebs - cp ../cache/packages_debian-installer.udeb/"`basename ${UDEB}`" ./ + cp ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ./ else # Downloading udebs wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/${UDEB} @@ -334,20 +334,20 @@ if ls ../config/binary_local-udebs/*.udeb > /dev/null 2>&1 then for FILE in ../config/binary_local-udebs/*_"${LH_ARCHITECTURE}".udeb ../config/binary_local-udebs/*_all.udeb do - SOURCE="`dpkg -f ${FILE} Source | awk '{ print $1 }'`" + SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')" if [ -z "${SOURCE}" ] then - SOURCE="`basename ${FILE} | awk -F_ '{ print $1 }'`" + SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')" fi case "${SOURCE}" in lib?*) - LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" ;; *) - LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" ;; esac @@ -358,7 +358,7 @@ then cp "${FILE}" pool/main/"${LETTER}"/"${SOURCE}" # Prefere local udebs over downloaded udebs - rm -f "`basename ${FILE} | awk -F_ '{ print $1 }'`"_*.udeb + rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb done fi @@ -373,7 +373,7 @@ then cat ../config/binary_debian-installer/udeb_exclude >> exclude fi -for EXCLUDE in `cat exclude` +for EXCLUDE in $(cat exclude) do rm -f "${EXCLUDE}"_*.udeb done @@ -391,10 +391,10 @@ fi # Moving udebs for UDEB in ${UDEBS} do - if [ -f "`basename ${UDEB}`" ] + if [ -f "$(basename ${UDEB})" ] then - mkdir -p `dirname ${UDEB}` - mv "`basename ${UDEB}`" "`dirname ${UDEB}`" + mkdir -p $(dirname ${UDEB}) + mv "$(basename ${UDEB})" "$(dirname ${UDEB})" fi done @@ -417,10 +417,10 @@ apt-ftparchive \ -o APT::FTPArchive::Release::Suite="${LH_DISTRIBUTION}" \ -o APT::FTPArchive::Release::Version="4.0" \ -o APT::FTPArchive::Release::Codename="${LH_DISTRIBUTION}" \ - -o APT::FTPArchive::Release::Date="`date -R`" \ + -o APT::FTPArchive::Release::Date="$(date -R)" \ -o APT::FTPArchive::Release::Architectures="${LH_ARCHITECTURE}" \ -o APT::FTPArchive::Release::Components="main" \ - -o APT::FTPArchive::Release::Description="Last updated: `date -R`" \ + -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \ release binary/dists/${LH_DISTRIBUTION} > binary/dists/${LH_DISTRIBUTION}/Release # Creating dist symlinks diff --git a/helpers/lh_binary_disk b/helpers/lh_binary_disk index 99d3117..26905e6 100755 --- a/helpers/lh_binary_disk +++ b/helpers/lh_binary_disk @@ -54,10 +54,10 @@ Create_lockfile .lock mkdir -p binary/.disk -ARCHITECTURE="`echo ${LH_ARCHITECTURE} | sed -e 's# #/#g'`" -DISTRIBUTION="`echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]'`" -DISTRIBUTION="${DISTRIBUTION}`echo ${LH_DISTRIBUTION} | cut -b 2-`" -eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" +ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')" +DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')" +DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)" +eval VERSION="$$(echo VERSION_${LH_DISTRIBUTION})" if [ "${LH_DISTRIBUTION}" != "etch" ] then @@ -74,7 +74,7 @@ case "${LH_MODE}" in echo "full_cd" > binary/.disk/cd_type - echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} CD Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} CD Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info cp "${LH_BASE}"/data/debian-cd/${LH_DISTRIBUTION}/${LH_ARCHITECTURE}_udeb_include binary/.disk/udeb_include ;; @@ -86,7 +86,7 @@ case "${LH_MODE}" in echo "not_complete" > binary/.disk/cd_type - echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} NETINST Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info cp "${LH_BASE}"/data/debian-cd/${LH_DISTRIBUTION}/${LH_ARCHITECTURE}_netinst_udeb_include binary/.disk/udeb_include @@ -101,20 +101,20 @@ case "${LH_MODE}" in echo "not_complete" > binary/.disk/cd_type - echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} BC Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} BC Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info cp "${LH_BASE}"/data/debian-cd/${LH_DISTRIBUTION}/${LH_ARCHITECTURE}_businesscard_udeb_include binary/.disk/udeb_include ;; disabled) - echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} LIVE Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} LIVE Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info ;; esac ;; ubuntu) # FIXME - echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Binary `date +%Y%m%d-%H:%M`" > binary/.disk/info + echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info # Ubuntu 7.04 "Feisty Fawn" - Release i386 (20070418) ;; esac diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub index 26f6b8f..218fb06 100755 --- a/helpers/lh_binary_grub +++ b/helpers/lh_binary_grub @@ -177,7 +177,7 @@ then LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} union=${LH_UNION_FILESYSTEM}" fi -LH_BOOTAPPEND_LIVE="`echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //'`" +LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')" # Parameters are listed at: linux/Documentation/kernel-parameters.txt FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" @@ -185,22 +185,22 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" # Assembling kernel configuration # Default entries -DEFAULT_FLAVOUR="`echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }'`" -DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`" -DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`" +DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')" +DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})" +DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//')" -Grub_live_entry "live" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}" -Grub_live_entry "live (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}" "${FAILSAFE}" +Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" +Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}" for KERNEL in chroot/boot/vmlinuz-* do - VERSION="`basename ${KERNEL} | sed -e 's/vmlinuz-//'`" + VERSION="$(basename ${KERNEL} | sed -e 's/vmlinuz-//')" - Grub_live_entry "live, kernel ${VERSION}" "`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`" "`basename ${DESTDIR_LIVE}`/initrd.img-${VERSION}" - Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/`basename ${KERNEL}`" "`basename ${DESTDIR_LIVE}`/initrd.img-${VERSION}" "${FAILSAFE}" + Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" + Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}" done -LINUX_LIVE="`/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`" +LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')" # Assembling debian-installer configuration if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] @@ -226,14 +226,14 @@ then Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}" fi -LINUX_INSTALL="`/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`" +LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'(" # Assembling memtest configuration if [ -f "${DESTDIR_LIVE}"/memtest ] then MEMTEST="title\t\tOther:\nroot" - MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/`basename ${DESTDIR_LIVE}`/memtest" - MEMTEST="`/bin/echo ${MEMTEST} | sed -e 's#//#/#g'`" + MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/$(basename ${DESTDIR_LIVE})/memtest" + MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's#//#/#g')" fi # Copying templates @@ -252,7 +252,7 @@ esac if [ "${LH_CHROOT_BUILD}" = "disabled" ] then - FILES="`echo ${FILES} | sed -e 's/chroot//g'`" + FILES="$(echo ${FILES} | sed -e 's/chroot//g')" fi # Copying grub @@ -285,7 +285,7 @@ then else # Overwriting splash file cp -f "${LH_GRUB_SPLASH}" binary/boot/grub - sed -i -e "s#splashimage.*#splashimage /boot/grub/`basename ${LH_GRUB_SPLASH}`#" binary/boot/grub/menu.lst + sed -i -e "s#splashimage.*#splashimage /boot/grub/$(basename ${LH_GRUB_SPLASH})#" binary/boot/grub/menu.lst fi fi diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes index 83f207e..e90716b 100755 --- a/helpers/lh_binary_includes +++ b/helpers/lh_binary_includes @@ -133,10 +133,10 @@ then fi # Adjusting install templates - ARCHITECTURE="`echo ${LH_ARCHITECTURE} | sed -e 's# #/#g'`" - DISTRIBUTION="`echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]'`" - DISTRIBUTION="${DISTRIBUTION}`echo ${LH_DISTRIBUTION} | cut -b 2-`" - eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" + ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')" + DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')" + DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)" + eval VERSION="$$(echo VERSION_${LH_DISTRIBUTION})" if [ -d binary/pool/main/l/live-installer ] then @@ -145,8 +145,8 @@ then TYPE="LIVE/NETINST" - DEBIAN_NAME="Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Binary `date +%Y%m%d-%H:%M`" - DEBIAN_DATE="`date +%Y%m%d-%H:%M`" + DEBIAN_NAME="Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Binary $(date +%Y%m%d-%H:%M)" + DEBIAN_DATE="$(date +%Y%m%d-%H:%M)" if [ "${LH_ARCHITECTURE}" = "i386" ] then diff --git a/helpers/lh_binary_net b/helpers/lh_binary_net index 2fb6e2c..ac7464e 100755 --- a/helpers/lh_binary_net +++ b/helpers/lh_binary_net @@ -59,21 +59,21 @@ then fi # Creating image file -if [ "`basename ${LH_NET_PATH}`" = "chroot" ] +if [ "$(basename ${LH_NET_PATH})" = "chroot" ] then mv chroot chroot.tmp fi -mv binary "`basename ${LH_NET_PATH}`" +mv binary "$(basename ${LH_NET_PATH})" cd .. -tar cfz binary-net.tar.gz "`basename ${OLDPWD}`/`basename ${LH_NET_PATH}`" "`basename ${OLDPWD}`/tftpboot" +tar cfz binary-net.tar.gz "$(basename ${OLDPWD})/$(basename ${LH_NET_PATH})" "$(basename ${OLDPWD})/tftpboot" mv binary-net.tar.gz "${OLDPWD}" cd "${OLDPWD}" -mv "`basename ${LH_NET_PATH}`" binary +mv "$(basename ${LH_NET_PATH})" binary -if [ "`basename ${LH_NET_PATH}`" = "chroot" ] +if [ "$(basename ${LH_NET_PATH})" = "chroot" ] then mv chroot.tmp chroot fi diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs index f800709..0fe9043 100755 --- a/helpers/lh_binary_rootfs +++ b/helpers/lh_binary_rootfs @@ -84,7 +84,7 @@ do if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) binary fi # Creating stage file @@ -110,8 +110,8 @@ case "${LH_CHROOT_FILESYSTEM}" in rm -f binary/${INITFS}/filesystem.ext2 fi - DU_DIM="`du -ks chroot/chroot | cut -f1`" - REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here... + DU_DIM="$(du -ks chroot/chroot | cut -f1)" + REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 20)" # Just 5% more to be sure, need something more sophistcated here... case "${LH_CHROOT_BUILD}" in enabled) @@ -179,7 +179,7 @@ case "${LH_CHROOT_FILESYSTEM}" in if [ "${LH_PACKAGES_LISTS}" = "minimal" ] || [ "${LH_PACKAGES_LISTS}" = "mini" ] then - MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e `ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's,chroot/,,g'`" + MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e $(ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's,chroot/,,g')" fi if [ -f config/binary_rootfs/squashfs.sort ] @@ -205,7 +205,7 @@ case "${LH_CHROOT_FILESYSTEM}" in if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` binary/${INITFS} + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) binary/${INITFS} fi # Saving cache @@ -228,7 +228,7 @@ do if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_rootfs + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/stages_rootfs fi fi done diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux index 4d26626..b845237 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -80,7 +80,7 @@ Syslinux_memtest_entry () KERNEL="${3}" # syslinux << 3.36 lacks support to file/path - if [ "`basename ${DESTDIR_LIVE}`" = "binary" ] + if [ "$(basename ${DESTDIR_LIVE})" = "binary" ] then KERNEL="${DIRECTORY}/${KERNEL}" fi @@ -94,7 +94,7 @@ Syslinux_memtest_entry () fi MEMTEST="${MEMTEST}\tkernel /${KERNEL}\n" - MEMTEST="`/bin/echo ${MEMTEST} | sed -e 's#//#/#g'`" + MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's#//#/#g')" } Syslinux_live_entry () @@ -106,9 +106,9 @@ Syslinux_live_entry () APPEND="${5}" # syslinux << 3.36 lacks support to file/path - if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "`basename ${DESTDIR_LIVE}`" != "binary" ] + if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "$(basename ${DESTDIR_LIVE})" != "binary" ] then - DIRECTORY="`basename ${DESTDIR_LIVE}`" + DIRECTORY="$(basename ${DESTDIR_LIVE})" KERNEL="${DIRECTORY}/${KERNEL}" INITRD="${DIRECTORY}/${INITRD}" fi @@ -133,9 +133,9 @@ Syslinux_install_entry () APPEND="${4}" # syslinux << 3.36 lacks support to file/path - if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "`basename ${DESTDIR_INSTALL}`" != "binary" ] + if [ "${LH_BINARY_IMAGES}" != "net" ] && [ "$(basename ${DESTDIR_INSTALL})" != "binary" ] then - DIRECTORY="`basename ${DESTDIR_INSTALL}`" + DIRECTORY="$(basename ${DESTDIR_INSTALL})" KERNEL="${DIRECTORY}/${KERNEL}" INITRD="${DIRECTORY}/${INITRD}" fi @@ -275,7 +275,7 @@ then fi fi -LH_BOOTAPPEND_LIVE="`echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //'`" +LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')" # Parameters are listed at: linux/Documentation/kernel-parameters.txt FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" @@ -283,19 +283,19 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" # Assembling kernel configuration # Default entries -DEFAULT_FLAVOUR="`echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }'`" -DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`" -DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`" +DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')" +DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})" +DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//')" Syslinux_live_entry "live" "${LH_SYSLINUX_MENU_LH_ENTRY}" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" Syslinux_live_entry "live-failsafe" "${LH_SYSLINUX_MENU_LIVE_FAILSAFE_ENTRY}" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}" -if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ] +if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ] then for KERNEL in chroot/boot/vmlinuz-* do - KERNEL_IMAGE="`basename ${KERNEL}`" - KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//'`" + KERNEL_IMAGE="$(basename ${KERNEL})" + KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//')" INITRD="initrd.img-${KERNEL_VERSION}" Syslinux_live_entry "live-${KERNEL_VERSION}" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${KERNEL_IMAGE}" "${INITRD}" @@ -303,7 +303,7 @@ then done fi -LINUX_LIVE="`/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`" +LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')" # Assembling debian-installer configuration if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] @@ -340,7 +340,7 @@ then Syslinux_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}" fi -LINUX_INSTALL="`/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`" +LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g')" # Assembling memtest configuration if [ -f "${DESTDIR_LIVE}"/memtest ] @@ -368,21 +368,21 @@ case "${LH_BINARY_IMAGES}" in for FILE in binary/isolinux/*.live do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .live` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .live) done if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] then for FILE in binary/isolinux/*.install do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install) done if [ "${LH_ARCHITECTURE}" = "amd64" ] || [ "${LH_ARCHITECTURE}" = "i386" ] || [ "${LH_ARCHITECTURE}" = "powerpc" ] then for FILE in binary/isolinux/*.install.g-i do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install.g-i` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install.g-i) done else rm -f binary/isolinux/*.install.g-i @@ -408,11 +408,11 @@ case "${LH_BINARY_IMAGES}" in # Copying menu module if [ "${LH_SYSLINUX_MENU}" != "disabled" ] then - MENUPATH="`grep 'menu.c32' binary/isolinux/isolinux.cfg | sed 's,DEFAULT\s*\(.*menu.c32\)$,\1,g'`" - MENUMODULE="`basename ${MENUPATH}`" + MENUPATH="$(grep 'menu.c32' binary/isolinux/isolinux.cfg | sed 's,DEFAULT\s*\(.*menu.c32\)$,\1,g')" + MENUMODULE="$(basename ${MENUPATH})" - mkdir -p binary/isolinux/"`dirname ${MENUPATH}`" - cp chroot/usr/lib/syslinux/"${MENUMODULE}" binary/isolinux/"`dirname ${MENUPATH}`" + mkdir -p binary/isolinux/"$(dirname ${MENUPATH})" + cp chroot/usr/lib/syslinux/"${MENUMODULE}" binary/isolinux/"$(dirname ${MENUPATH})" fi # Copying splash screen @@ -423,13 +423,13 @@ case "${LH_BINARY_IMAGES}" in else if [ "${LH_SYSLINUX_MENU}" != "disabled" ] then - SPLASHPATH="`grep -i 'MENU BACKGROUND' binary/isolinux/isolinux.cfg | sed 's,MENU\sBACKGROUND\s*\(.*\)$,\1,g'`" + SPLASHPATH="$(grep -i 'MENU BACKGROUND' binary/isolinux/isolinux.cfg | sed 's,MENU\sBACKGROUND\s*\(.*\)$,\1,g')" if [ ! -e "${LH_SYSLINUX_SPLASH}" ] then Echo_error "${LH_SYSLINUX_SPLASH} doen't exist" exit 1 fi - mkdir -p binary/isolinux/"`dirname ${SPLASHPATH}`" + mkdir -p binary/isolinux/"$(dirname ${SPLASHPATH})" cp -f "${LH_SYSLINUX_SPLASH}" binary/isolinux/"${SPLASHPATH}" else cp -f "${LH_SYSLINUX_SPLASH}" binary/isolinux/splash.rle @@ -441,7 +441,7 @@ case "${LH_BINARY_IMAGES}" in sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" binary/isolinux/isolinux.cfg if [ -e binary/isolinux/f1.txt ] then - sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_MEDIA/CD-ROM/" binary/isolinux/f1.txt + sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_MEDIA/CD-ROM/" binary/isolinux/f1.txt fi sed -i -e "s/LH_MEDIA/CD-ROM/" binary/isolinux/f3.txt if [ -e binary/isolinux/f10.txt ] @@ -450,7 +450,7 @@ case "${LH_BINARY_IMAGES}" in fi # Working arround syslinux 8.3 limitation - if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ] + if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ] then NUMBER="0" @@ -496,21 +496,21 @@ case "${LH_BINARY_IMAGES}" in for FILE in tftpboot/pxelinux.cfg/*.live do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .live` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .live) done if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] then for FILE in tftpboot/pxelinux.cfg/*.install do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install) done if [ "${LH_ARCHITECTURE}" = "amd64" ] || [ "${LH_ARCHITECTURE}" = "i386" ] || [ "${LH_ARCHITECTURE}" = "powerpc" ] then for FILE in tftpboot/pxelinux.cfg/*.install.g-i do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install.g-i` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install.g-i) done else rm -f tftpboot/pxelinux.cfg/*.install.g-i @@ -549,12 +549,12 @@ case "${LH_BINARY_IMAGES}" in # Configure syslinux templates sed -i -e "s@LINUX_LIVE@${LINUX_LIVE}@" -e "s@LINUX_INSTALL@${LINUX_INSTALL}@" -e "s@MEMTEST@${MEMTEST}@" tftpboot/pxelinux.cfg/default sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" -e "s/LH_NET_SERVER/${LH_NET_SERVER}/" -e "s#LH_NET_PATH#${LH_NET_PATH}#" tftpboot/pxelinux.cfg/default - sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_MEDIA/netboot/" tftpboot/pxelinux.cfg/f1.txt + sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_MEDIA/netboot/" tftpboot/pxelinux.cfg/f1.txt sed -i -e "s/LH_MEDIA/netboot/" tftpboot/pxelinux.cfg/f3.txt sed -i -e "s/LH_VERSION/${VERSION}/" tftpboot/pxelinux.cfg/f10.txt # Working arround syslinux 8.3 limitation - if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -eq "1" ] + if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -eq "1" ] then mv "${DESTDIR_LIVE}"/vmlinuz-*-${LH_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/vmlinuz mv "${DESTDIR_LIVE}"/initrd.img-*-${LH_LINUX_FLAVOURS} "${DESTDIR_LIVE}"/initrd.img @@ -594,21 +594,21 @@ case "${LH_BINARY_IMAGES}" in for FILE in "${DESTDIR}"/*.live do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .live` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .live) done if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] then for FILE in "${DESTDIR}"/*.install do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install) done if [ "${LH_ARCHITECTURE}" = "amd64" ] || [ "${LH_ARCHITECTURE}" = "i386" ] || [ "${LH_ARCHITECTURE}" = "powerpc" ] then for FILE in "${DESTDIR}"/*.install.g-i do - mv ${FILE} `dirname ${FILE}`/`basename ${FILE} .install.g-i` + mv ${FILE} $(dirname ${FILE})/$(basename ${FILE} .install.g-i) done else rm -f "${DESTDIR}"/*.install.g-i @@ -643,12 +643,12 @@ case "${LH_BINARY_IMAGES}" in # Configure syslinux templates sed -i -e "s@LINUX_LIVE@${LINUX_LIVE}@" -e "s@LINUX_INSTALL@${LINUX_INSTALL}@" -e "s@MEMTEST@${MEMTEST}@" "${DESTDIR}"/syslinux.cfg sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" "${DESTDIR}"/syslinux.cfg - sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_MEDIA/hd-media/" "${DESTDIR}"/f1.txt #FIXME + sed -i -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_MEDIA/hd-media/" "${DESTDIR}"/f1.txt #FIXME sed -i -e "s/LH_MEDIA/hd-media/" "${DESTDIR}"/f3.txt #FIXME sed -i -e "s/LH_VERSION/${VERSION}/" "${DESTDIR}"/f10.txt # Workaround for syslinux (<< 3.36) which doesn't support long file/path names - if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ] + if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ] then NUMBER="0" diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd index 09c38f7..ac5d5a5 100755 --- a/helpers/lh_binary_usb-hdd +++ b/helpers/lh_binary_usb-hdd @@ -81,10 +81,10 @@ then fi # Everything which comes here needs to be cleaned up, -DU_DIM="`du -ms binary | cut -f1`" -REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 50`" # Just 2% more to be sure, need something more sophistcated here... +DU_DIM="$(du -ms binary | cut -f1)" +REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 50)" # Just 2% more to be sure, need something more sophistcated here... dd if=/dev/zero of=chroot/binary.img bs=1024k count=${REAL_DIM} -FREELO="`${LH_LOSETUP} -f`" +FREELO="$(${LH_LOSETUP} -f)" if [ ! -b chroot/${FREELO} ] then MAKEDEV="true" @@ -124,7 +124,7 @@ esac ${LH_LOSETUP} -d ${FREELO} -FREELO="`${LH_LOSETUP} -f`" +FREELO="$(${LH_LOSETUP} -f)" lh_losetup $FREELO chroot/binary.img 1 case "${LH_CHROOT_BUILD}" in @@ -153,8 +153,8 @@ find /live/vmlinuz EOM EOF - rootpartition="`Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz'`" - usbdev="`echo $rootpartition | sed -e 's/,[[:digit:]]//'`" + rootpartition="$(Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz')" + usbdev="$(echo $rootpartition | sed -e 's/,[[:digit:]]//')" echo "Root partition is $rootpartition, device is: $usbdev" echo "WAITING..." && read diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot index c404c31..e3f8df3 100755 --- a/helpers/lh_binary_yaboot +++ b/helpers/lh_binary_yaboot @@ -75,7 +75,7 @@ Yaboot_live_entry () INITRD="${3}" APPEND="${4}" - DIRECTORY="/`basename ${DESTDIR_LIVE}`" + DIRECTORY="/$(basename ${DESTDIR_LIVE})" LINUX_LIVE="${LINUX_LIVE}\nimage=${DIRECTORY}/${KERNEL}\n" LINUX_LIVE="${LINUX_LIVE}\tlabel=${LABEL}\n" @@ -91,7 +91,7 @@ Yaboot_install_entry () INITRD="${3}" APPEND="${4}" - DIRECTORY="/`basename ${DESTDIR_LIVE}`" + DIRECTORY="/$(basename ${DESTDIR_LIVE})" if [ "${LH_DISTRIBUTION}" != "etch" ] && [ "${LABEL}" != "rescue" ] && [ "${LABEL}" != "rescuegui" ] then @@ -185,7 +185,7 @@ then LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} union=${LH_UNION_FILESYSTEM}" fi -LH_BOOTAPPEND_LIVE="`echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //'`" +LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')" # Parameters are listed at: linux/Documentation/kernel-parameters.txt FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly" @@ -193,19 +193,19 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly" # Assembling kernel configuration # Default entries -DEFAULT_FLAVOUR="`echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }'`" -DEFAULT_KERNEL="`basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR}`" -DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinux-//'`" +DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')" +DEFAULT_KERNEL="$(basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR})" +DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinux-//')" Yaboot_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}" -if [ "`echo ${LH_LINUX_FLAVOURS} | wc -w`" -gt "1" ] +if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ] then for KERNEL in chroot/boot/vmlinux-* do - KERNEL_IMAGE="`basename ${KERNEL}`" - KERNEL_VERSION="`echo ${KERNEL_IMAGE} | sed -e 's/vmlinux-//'`" + KERNEL_IMAGE="$(basename ${KERNEL})" + KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinux-//')" INITRD="initrd.img-${KERNEL_VERSION}" Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}" @@ -213,7 +213,7 @@ then done fi -LINUX_LIVE="`/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g'`" +LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')" # Assembling debian-installer configuration if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] @@ -237,7 +237,7 @@ then Yaboot_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}" fi -LINUX_INSTALL="`/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g'`" +LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g')" case "${LH_BINARY_IMAGES}" in iso|usb-hdd) @@ -267,7 +267,7 @@ case "${LH_BINARY_IMAGES}" in # Configure yaboot templates sed -i -e "s#LINUX_LIVE#${LINUX_LIVE}#" -e "s#LINUX_INSTALL#${LINUX_INSTALL}#" binary/yaboot/yaboot.conf sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" binary/yaboot/yaboot.conf - sed -i -e "s/LH_DATE/`date +%Y%m%d`/" -e "s/LH_VERSION/${VERSION}/" binary/yaboot/boot.msg + sed -i -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_VERSION/${VERSION}/" binary/yaboot/boot.msg ;; esac diff --git a/helpers/lh_bootstrap_cache b/helpers/lh_bootstrap_cache index b253b5d..66f57c2 100755 --- a/helpers/lh_bootstrap_cache +++ b/helpers/lh_bootstrap_cache @@ -60,7 +60,7 @@ do if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Creating stage file @@ -89,7 +89,7 @@ do if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_bootstrap + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/stages_bootstrap fi # Creating stage file diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap index dcc350d..225b24d 100755 --- a/helpers/lh_bootstrap_cdebootstrap +++ b/helpers/lh_bootstrap_cdebootstrap @@ -111,7 +111,7 @@ then if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Removing old cache @@ -131,7 +131,7 @@ then if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Remove cdebootstrap-helper-diverts (needed at least for minimal flavours) diff --git a/helpers/lh_bootstrap_copy b/helpers/lh_bootstrap_copy index d84916c..1f48c7f 100755 --- a/helpers/lh_bootstrap_copy +++ b/helpers/lh_bootstrap_copy @@ -53,7 +53,7 @@ Check_lockfile .lock Create_lockfile .lock # Copying host system -find / ! -name /proc ! -name /sys ! -name "`dirname ${PWD}`" | xargs cp -a chroot +find / ! -name /proc ! -name /sys ! -name "$(dirname ${PWD})" | xargs cp -a chroot # Creating stage file Create_stagefile .stage/bootstrap diff --git a/helpers/lh_bootstrap_debootstrap b/helpers/lh_bootstrap_debootstrap index 7661025..99df978 100755 --- a/helpers/lh_bootstrap_debootstrap +++ b/helpers/lh_bootstrap_debootstrap @@ -89,7 +89,7 @@ then if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Removing old cache @@ -109,7 +109,7 @@ then if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Removing bootstrap cache diff --git a/helpers/lh_chroot_cache b/helpers/lh_chroot_cache index 4ec2d13..782043d 100755 --- a/helpers/lh_chroot_cache +++ b/helpers/lh_chroot_cache @@ -60,7 +60,7 @@ do if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) chroot fi # Creating stage file @@ -88,7 +88,7 @@ do if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R `whoami`:`whoami` cache/stages_chroot + ${LH_ROOT_COMMAND} chown -R $(whoami):$(whoami) cache/stages_chroot fi # Creating stage file diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks index 2b571a5..da2be17 100755 --- a/helpers/lh_chroot_hacks +++ b/helpers/lh_chroot_hacks @@ -69,7 +69,7 @@ case "${LH_BINARY_IMAGES}" in then mkdir chroot/etc/initramfs-tools fi - if [ ! "`grep 'MODULES=netboot' chroot/etc/initramfs-tools/initramfs.conf`" ] + if [ ! "$(grep 'MODULES=netboot' chroot/etc/initramfs-tools/initramfs.conf)" ] then # Configuring initramfs for NFS cat >> chroot/etc/initramfs-tools/initramfs.conf << EOF @@ -103,7 +103,7 @@ rm -f chroot/var/lib/dpkg/*-old if [ -n "${LH_ROOT_COMMAND}" ] then - ${LH_ROOT_COMMAND} chown -R --quiet `whoami`:`whoami` chroot + ${LH_ROOT_COMMAND} chown -R --quiet $(whoami):$(whoami) chroot fi if [ -d chroot/home/${LH_USERNAME} ] diff --git a/helpers/lh_chroot_local-hooks b/helpers/lh_chroot_local-hooks index 6197b48..d0f487b 100755 --- a/helpers/lh_chroot_local-hooks +++ b/helpers/lh_chroot_local-hooks @@ -56,16 +56,16 @@ then cp "${HOOK}" chroot/root # Making hook executable - if [ ! -x chroot/root/"`basename ${HOOK}`" ] + if [ ! -x chroot/root/"$(basename ${HOOK})" ] then - chmod +x chroot/root/"`basename ${HOOK}`" + chmod +x chroot/root/"$(basename ${HOOK})" fi # Executing hook - Chroot "/root/`basename ${HOOK}`" + Chroot "/root/$(basename ${HOOK})" # Removing hook - rm -f chroot/root/"`basename ${HOOK}`" + rm -f chroot/root/"$(basename ${HOOK})" done # Creating stage file diff --git a/helpers/lh_chroot_local-packageslists b/helpers/lh_chroot_local-packageslists index bd615e3..2c03f3c 100755 --- a/helpers/lh_chroot_local-packageslists +++ b/helpers/lh_chroot_local-packageslists @@ -55,21 +55,21 @@ then for PACKAGESLIST in config/chroot_local-packageslists/* do # Generate package list - Expand_packagelist "`basename ${PACKAGESLIST}`" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper/lists}/lists" > chroot/root/"`basename ${PACKAGESLIST}`" + Expand_packagelist "$(basename ${PACKAGESLIST})" "config/chroot_local-packageslists" "${LH_BASE:-/usr/share/live-helper/lists}/lists" > chroot/root/"$(basename ${PACKAGESLIST})" # Installing package list case "${LH_APT}" in apt|apt-get) - Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` apt-get install --yes" + Chroot "xargs --arg-file=/root/$(basename ${PACKAGESLIST}) apt-get install --yes" ;; aptitude) - Chroot "xargs --arg-file=/root/`basename ${PACKAGESLIST}` aptitude install --assume-yes" + Chroot "xargs --arg-file=/root/$(basename ${PACKAGESLIST}) aptitude install --assume-yes" ;; esac # Removing package list - rm -f chroot/root/"`basename ${PACKAGESLIST}`" + rm -f chroot/root/"$(basename ${PACKAGESLIST})" done # Saving cache diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources index 307aeba..61e0b66 100755 --- a/helpers/lh_chroot_sources +++ b/helpers/lh_chroot_sources @@ -144,8 +144,8 @@ case "${1}" in for FILE in config/chroot_sources/*.bootstrap.gpg do cp ${FILE} chroot/root - Chroot "apt-key add /root/`basename ${FILE}`" - rm -f chroot/root/`basename ${FILE}` + Chroot "apt-key add /root/$(basename ${FILE})" + rm -f chroot/root/$(basename ${FILE}) done fi @@ -155,8 +155,8 @@ case "${1}" in for PACKAGE in config/chroot_sources/*.deb do cp ${PACKAGE} chroot/root - Chroot "dpkg -i `basename ${PACKAGE}`" - rm -f chroot/root/`basename ${PACKAGE}` + Chroot "dpkg -i $(basename ${PACKAGE})" + rm -f chroot/root/$(basename ${PACKAGE}) done fi @@ -279,8 +279,8 @@ case "${1}" in for FILE in config/chroot_sources/*.binary.gpg do cp ${FILE} chroot/root - Chroot "apt-key add /root/`basename ${FILE}`" - rm -f chroot/root/`basename ${FILE}` + Chroot "apt-key add /root/$(basename ${FILE})" + rm -f chroot/root/$(basename ${FILE}) done fi diff --git a/helpers/lh_chroot_sysvinit b/helpers/lh_chroot_sysvinit index b4927b6..2ddbb1f 100755 --- a/helpers/lh_chroot_sysvinit +++ b/helpers/lh_chroot_sysvinit @@ -52,7 +52,7 @@ then # Disable all for FILE in chroot/etc/init.d/* do - Chroot "update-rc.d -f `basename ${FILE}` remove" + Chroot "update-rc.d -f $(basename ${FILE}) remove" done # Re-enable all required (taken from -f standard chroot) diff --git a/helpers/lh_config b/helpers/lh_config index 78604ea..a69bf3b 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -101,7 +101,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ Local_arguments () { - ARGUMENTS="`getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,losetup:,mode:,root-command:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,iso-memtest:,net-filesystem:,net-mountoptions:,net-path:,net-server:,syslinux-splash:,syslinux-timeout:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}"`" + ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,losetup:,mode:,root-command:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-bootstrap-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,iso-memtest:,net-filesystem:,net-mountoptions:,net-path:,net-server:,syslinux-splash:,syslinux-timeout:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")" if [ "${?}" != "0" ] then @@ -965,7 +965,7 @@ EOF if [ "${CONFIG}" = "clone" ] # FIXME then # Read package selection - echo `dpkg --get-selections | awk '{ print $1 }'` > config/chroot_local-packageslists/local-system + echo $(dpkg --get-selections | awk '{ print $1 }') > config/chroot_local-packageslists/local-system # Read debconf questions if [ ! -f /usr/bin/debconf-get-selections ] diff --git a/helpers/lh_losetup b/helpers/lh_losetup index 662b4ad..2ea7f9e 100755 --- a/helpers/lh_losetup +++ b/helpers/lh_losetup @@ -38,10 +38,10 @@ FILE="${2}" PARTITION="${3:=1}" ${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}" -FDISK_OUT="`fdisk -l -u ${DEVICE} 2>&1`" +FDISK_OUT="$(fdisk -l -u ${DEVICE} 2>&1)" ${LH_ROOT_COMMAND} ${LH_LOSETUP} -d "${DEVICE}" -LOOPDEVICE="`echo ${DEVICE}p${PARTITION}`" +LOOPDEVICE="$(echo ${DEVICE}p${PARTITION})" if [ "${PARTITION}" = "0" ] then @@ -49,8 +49,8 @@ then ${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}" else - CYLINDERS="`echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p"`" - OFFSET="`expr ${CYLINDERS} '*' 512`" + CYLINDERS="$(echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p")" + OFFSET="$(expr ${CYLINDERS} '*' 512)" Echo_message "Mounting ${DEVICE} with offset ${OFFSET}" diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian index 8e60000..8811fa6 100755 --- a/helpers/lh_source_debian +++ b/helpers/lh_source_debian @@ -98,15 +98,15 @@ rm -f chroot/root/dpkg-selection.txt # Sort sources for DSC in chroot/*.dsc do - SOURCE="`sed -n 's/^Source: //p' ${DSC}`" + SOURCE="$(sed -n 's/^Source: //p' ${DSC})" case "${SOURCE}" in lib?*) - LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" ;; *) - LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`" + LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" ;; esac diff --git a/helpers/lh_source_debian-live b/helpers/lh_source_debian-live index d92fe3a..acecb6d 100755 --- a/helpers/lh_source_debian-live +++ b/helpers/lh_source_debian-live @@ -64,7 +64,7 @@ cp -a config source/debian-live # Create tarball cd source -tar cfz debian-live-config_`date +%Y%m%d.%s`.tar.gz debian-live +tar cfz debian-live-config_$(date +%Y%m%d.%s).tar.gz debian-live cd "${OLDPWD}" rm -rf source/debian-live/config diff --git a/helpers/lh_source_disk b/helpers/lh_source_disk index e387749..3b7a95a 100755 --- a/helpers/lh_source_disk +++ b/helpers/lh_source_disk @@ -54,10 +54,10 @@ Create_lockfile .lock mkdir -p source/.disk -ARCHITECTURE="`echo ${LH_ARCHITECTURE} | sed -e 's# #/#g'`" -DISTRIBUTION="`echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]'`" -DISTRIBUTION="${DISTRIBUTION}`echo ${LH_DISTRIBUTION} | cut -b 2-`" -eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" +ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')" +DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')" +DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)" +eval VERSION="$$(echo VERSION_${LH_DISTRIBUTION})" case "${LH_MODE}" in debian) @@ -73,11 +73,11 @@ case "${LH_MODE}" in TYPE="LIVE" fi - echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Source `date +%Y%m%d-%H:%M`" > source/.disk/info + echo "Debian GNU/Linux ${VERSION} \"${DISTRIBUTION}\" - Official ${ARCHITECTURE} ${TYPE} Source $(date +%Y%m%d-%H:%M)" > source/.disk/info ;; ubuntu) - echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Source `date +%Y%m%d-%H:%M`" > source/.disk/info + echo "Ubuntu Linux ${VERSION} \"${DISTRIBUTION}\" - Unofficial ${ARCHITECTURE} LIVE/NETINST Source $(date +%Y%m%d-%H:%M)" > source/.disk/info ;; esac diff --git a/helpers/lh_source_usb-hdd b/helpers/lh_source_usb-hdd index ff78393..dfbf022 100755 --- a/helpers/lh_source_usb-hdd +++ b/helpers/lh_source_usb-hdd @@ -71,10 +71,10 @@ then fi # Everything which comes here needs to be cleaned up, -DU_DIM="`du -ms source | cut -f1`" -REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 50`" # Just 2% more to be sure, need something more sophistcated here... +DU_DIM="$(du -ms source | cut -f1)" +REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 50)" # Just 2% more to be sure, need something more sophistcated here... dd if=/dev/zero of=source.img bs=1024k count=${REAL_DIM} -FREELO="`${LH_LOSETUP} -f`" +FREELO="$(${LH_LOSETUP} -f)" if [ ! -b chroot/${FREELO} ] then MAKEDEV="true" diff --git a/helpers/lh_testroot b/helpers/lh_testroot index f213f86..3278007 100755 --- a/helpers/lh_testroot +++ b/helpers/lh_testroot @@ -34,7 +34,7 @@ Read_conffile "${LH_CONFIG}" Set_defaults # Checking user account -if [ "`${LH_ROOT_COMMAND} id -u`" -ne "0" ] +if [ "$(${LH_ROOT_COMMAND} id -u)" -ne "0" ] then Echo_error "need root privileges" exit 1 diff --git a/hooks/mini b/hooks/mini index c074fe7..dda40bc 100755 --- a/hooks/mini +++ b/hooks/mini @@ -38,7 +38,7 @@ rm -rf /var/lib/apt/lists mkdir -p /var/lib/apt/lists/partial # Truncating logs -for FILE in `find /var/log/ -type f` +for FILE in $(find /var/log/ -type f) do cat < /dev/null > $FILE done diff --git a/hooks/minimal b/hooks/minimal index 37e1f75..3886d9a 100755 --- a/hooks/minimal +++ b/hooks/minimal @@ -30,7 +30,7 @@ rm -rf /var/lib/apt/lists mkdir -p /var/lib/apt/lists/partial # Truncating logs -for FILE in `find /var/log/ -type f` +for FILE in $(find /var/log/ -type f) do cat < /dev/null > $FILE done -- cgit v1.0