[X2Go-Commits] [nx-libs] 37/45: debian/roll-tarballs.sh: use more quotes.
git-admin at x2go.org
git-admin at x2go.org
Mon Apr 27 04:51:02 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit e68c36625d9d76d96ebe0d94ba02803bee574783
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun Apr 26 23:45:42 2015 +0200
debian/roll-tarballs.sh: use more quotes.
Fixes potential bugs, including one triggered by an unquoted hash within
the command line. BASH accepts this. Other shells do not (i.e., treat
everything following the hash character as a comment.)
---
debian/roll-tarballs.sh | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh
index c7cac5f..c2819cf 100755
--- a/debian/roll-tarballs.sh
+++ b/debian/roll-tarballs.sh
@@ -33,7 +33,7 @@ usage() {
PROJECT="nx-libs"
NULL=""
-test -d .git || usage
+test -d ".git" || usage
RELEASE="$1"
test -n "${RELEASE}" || usage
CHECKOUT="$2"
@@ -52,14 +52,14 @@ else
fi
if [ x"$RELEASE" == "xHEAD" ]; then
- CHECKOUT=HEAD
+ CHECKOUT="HEAD"
fi
if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then
echo " '${RELEASE}' is not a valid release number because there is no git tag named $CHECKOUT."
echo " Please specify one of the following releases:"
echo "HEAD"
- git tag -l | grep ^redist | cut -f2 -d/ | sort -u
+ git tag -l | grep "^redist" | cut -f2 -d"/" | sort -u
exit 1
fi
@@ -71,42 +71,42 @@ TEMP_DIR="$(mktemp -d)"
trap "rm -f \"${MANIFEST}\"; rm -rf \"${TEMP_DIR}\"" 0
# create local copy of Git project at temp location
-git archive --format=tar ${CHECKOUT} --prefix=${PROJECT}-${RELEASE}/ | ( cd $TEMP_DIR; tar xf - )
+git archive --format=tar "${CHECKOUT}" --prefix="${PROJECT}-${RELEASE}/" | ( cd "$TEMP_DIR"; tar xf - )
echo "Created tarball for $CHECKOUT"
cd "$TEMP_DIR/${PROJECT}-${RELEASE}/"
-mkdir -p doc/applied-patches
+mkdir -p "doc/applied-patches"
# prepare patches for lite and full tarball
if [ "x$MODE" = "xfull" ]; then
- cat debian/patches/series | sort | grep -v ^# | egrep "([0-9]+_.*\.(full|full\+lite)\.patch)" | while read file
+ cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+_.*\.(full|full\+lite)\.patch)" | while read file
do
- cp -v debian/patches/$file doc/applied-patches
- echo ${file##*/} >> doc/applied-patches/series
+ cp -v "debian/patches/$file" "doc/applied-patches/"
+ echo "${file##*/}" >> "doc/applied-patches/series"
done
else
rm -Rf "nxcompshad"*
rm -Rf "nxcompext"*
rm -Rf "nx-X11"*
- cat debian/patches/series | sort | grep -v ^# | egrep "([0-9]+_.*\.full\+lite\.patch)" | while read file
+ cat "debian/patches/series" | sort | grep -v '^#' | egrep "([0-9]+_.*\.full\+lite\.patch)" | while read file
do
- cp -v debian/patches/$file doc/applied-patches
- echo ${file##*/} >> doc/applied-patches/series
+ cp -v "debian/patches/$file" "doc/applied-patches/"
+ echo "${file##*/}" >> "doc/applied-patches/series"
done
fi
# apply all patches shipped in debian/patches and create a copy of them that we ship with the tarball
if [ -s "doc/applied-patches/series" ]; then
- QUILT_PATCHES=doc/applied-patches quilt --quiltrc /dev/null push -a -q
+ QUILT_PATCHES="doc/applied-patches" quilt --quiltrc /dev/null push -a -q
else
echo "No patches applied at all. Very old release?"
fi
# very old release did not add any README
for f in $(ls README* 2>/dev/null); do
- mv -v $f doc/;
+ mv -v "$f" "doc/";
done
# remove folders that we do not want to roll into the tarball
@@ -116,7 +116,7 @@ rm -Rf "debian/"
# remove files, that we do not want in the tarballs (build cruft)
rm -Rf nx*/configure nx*/autom4te.cache*
-cd $OLDPWD
+cd "$OLDPWD"
# create target location for tarball
mkdir -p "$TARGETDIR/_releases_/source/${PROJECT}/"
@@ -124,7 +124,7 @@ mkdir -p "$TARGETDIR/_releases_/source/${PROJECT}/"
# roll the ball...
cd "$TEMP_DIR"
find "${PROJECT}-${RELEASE}" -type f | sort > "$MANIFEST"
-cd $OLDPWD
+cd "$OLDPWD"
tar c -C "$TEMP_DIR" \
--owner 0 \
--
Alioth's /srv/git/code.x2go.org/nx-libs.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list