diff options
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/architecture.sh | 4 | ||||
-rwxr-xr-x | functions/arguments.sh | 2 | ||||
-rwxr-xr-x | functions/common.sh | 2 | ||||
-rwxr-xr-x | functions/defaults.sh | 30 | ||||
-rwxr-xr-x | functions/lockfile.sh | 2 | ||||
-rwxr-xr-x | functions/packages.sh | 2 | ||||
-rwxr-xr-x | functions/packageslists.sh | 2 | ||||
-rwxr-xr-x | functions/stagefile.sh | 10 |
8 files changed, 27 insertions, 27 deletions
diff --git a/functions/architecture.sh b/functions/architecture.sh index 4c21458da..d9c84f869 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 3080f25a0..787335357 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 e3ec382a7..a01de6a2e 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 4ed1c9f56..5d971d86b 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 e80bf41a4..185030842 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 9e10b1dfc..dadb00798 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 f25b5fbca..1ef64e348 100755 --- a/functions/packageslists.sh +++ b/functions/packageslists.sh @@ -34,7 +34,7 @@ Expand_packagelist_file () shift shift - for INCLUDE in `sed -ne 's/^#<include> \(.*\)/\1/gp' "${FILE}"`; + for INCLUDE in $(sed -ne 's/^#<include> \(.*\)/\1/gp' "${FILE}"); do Expand_packagelist "${INCLUDE}" "${@}" done diff --git a/functions/stagefile.sh b/functions/stagefile.sh index 647b1817d..3a6765e55 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 |