summaryrefslogtreecommitdiff
path: root/test/test.d/signed-packages.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-06-18 12:07:09 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-16 13:49:57 -0400
commit7850874b1ef1b18de585be108e3be899d95a3a2a (patch)
tree173896aa05b68545672124dbe28b098fec98ee0a /test/test.d/signed-packages.sh
parent282bf65c81e278b9237b4c202d325642bc0aa1a3 (diff)
Fix quoting around variables, especially arrays.
Other than pure quoting, this involved: - swapping */@ for array access in a few places - fiddling with printf in a pipeline - replacing `$(echo ${array[@]})` with `${array[*]}` - replacing `echo $(...)` with `...` When searching for these things, I used the command: grep -Prn --exclude-dir=.git '(?<!["=]|\[\[ |\[\[ -[zn] )\$(?!{?#|\(|\? )' and ignored a bunch of false positives.
Diffstat (limited to 'test/test.d/signed-packages.sh')
-rwxr-xr-xtest/test.d/signed-packages.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test.d/signed-packages.sh b/test/test.d/signed-packages.sh
index 03566ef..4eccb41 100755
--- a/test/test.d/signed-packages.sh
+++ b/test/test.d/signed-packages.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testAddSignedPackage() {
@@ -18,8 +18,8 @@ testAddInvalidSignedPackage() {
local p
releasePackage extra 'pkg-simple-a' 'i686'
for p in "${STAGING}"/extra/*${PKGEXT}; do
- unxz $p
- xz -0 ${p%%.xz}
+ unxz "$p"
+ xz -0 "${p%%.xz}"
done
../db-update >/dev/null 2>&1 && fail "db-update should fail when a signature is invalid!"
}
@@ -28,7 +28,7 @@ testAddBrokenSignature() {
local s
releasePackage extra 'pkg-simple-a' 'i686'
for s in "${STAGING}"/extra/*.sig; do
- echo 0 > $s
+ echo 0 > "$s"
done
../db-update >/dev/null 2>&1 && fail "db-update should fail when a signature is broken!"
}