summaryrefslogtreecommitdiff
path: root/examples
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 /examples
parent81a76d4adc812c16be8238fedda25bd43ab3a379 (diff)
downloadlive-build-f2734daf0a9519db6b303683d3ac413a20d56e2a.zip
live-build-f2734daf0a9519db6b303683d3ac413a20d56e2a.tar.gz
Replacing backticks with POSIX expression.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/cron/etch.sh16
-rwxr-xr-xexamples/cron/lenny.sh16
-rwxr-xr-xexamples/cron/manpages.sh12
-rwxr-xr-xexamples/cron/sid.sh16
-rwxr-xr-xexamples/cron/snapshots.sh22
5 files changed, 41 insertions, 41 deletions
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