summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-24 08:47:42 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:27 +0100
commitf2734daf0a9519db6b303683d3ac413a20d56e2a (patch)
tree6d9d0c85e7141243e0b40adcd847d1cc7c479448 /functions
parent81a76d4adc812c16be8238fedda25bd43ab3a379 (diff)
downloadlive-build-f2734daf0a9519db6b303683d3ac413a20d56e2a.zip
live-build-f2734daf0a9519db6b303683d3ac413a20d56e2a.tar.gz
Replacing backticks with POSIX expression.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/architecture.sh4
-rwxr-xr-xfunctions/arguments.sh2
-rwxr-xr-xfunctions/common.sh2
-rwxr-xr-xfunctions/defaults.sh30
-rwxr-xr-xfunctions/lockfile.sh2
-rwxr-xr-xfunctions/packages.sh2
-rwxr-xr-xfunctions/packageslists.sh2
-rwxr-xr-xfunctions/stagefile.sh10
8 files changed, 27 insertions, 27 deletions
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/^#<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 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