Skip to content

Commit 87c4320

Browse files
committed
gitian-build.sh: fix signProg being recognized as two parameters
1 parent 07090c5 commit 87c4320

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

contrib/gitian-build.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ while :; do
7777
-S|--signer)
7878
if [ -n "$2" ]
7979
then
80-
SIGNER=$2
80+
SIGNER="$2"
8181
shift
8282
else
8383
echo 'Error: "--signer" requires a non-empty argument.'
@@ -190,7 +190,7 @@ fi
190190
# Get signer
191191
if [[ -n "$1" ]]
192192
then
193-
SIGNER=$1
193+
SIGNER="$1"
194194
shift
195195
fi
196196

@@ -203,7 +203,7 @@ then
203203
fi
204204

205205
# Check that a signer is specified
206-
if [[ $SIGNER == "" ]]
206+
if [[ "$SIGNER" == "" ]]
207207
then
208208
echo "$scriptName: Missing signer."
209209
echo "Try $scriptName --help for more information"
@@ -272,7 +272,7 @@ then
272272
echo "Compiling ${VERSION} Linux"
273273
echo ""
274274
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
275-
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
275+
./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
276276
mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/${VERSION}
277277
fi
278278
# Windows
@@ -282,7 +282,7 @@ then
282282
echo "Compiling ${VERSION} Windows"
283283
echo ""
284284
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
285-
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
285+
./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
286286
mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
287287
mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/${VERSION}
288288
fi
@@ -293,7 +293,7 @@ then
293293
echo "Compiling ${VERSION} Mac OSX"
294294
echo ""
295295
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
296-
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
296+
./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
297297
mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
298298
mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/${VERSION}
299299
fi
@@ -306,9 +306,9 @@ then
306306
echo "Committing ${VERSION} Unsigned Sigs"
307307
echo ""
308308
pushd gitian.sigs
309-
git add ${VERSION}-linux/${SIGNER}
310-
git add ${VERSION}-win-unsigned/${SIGNER}
311-
git add ${VERSION}-osx-unsigned/${SIGNER}
309+
git add ${VERSION}-linux/"${SIGNER}"
310+
git add ${VERSION}-win-unsigned/"${SIGNER}"
311+
git add ${VERSION}-osx-unsigned/"${SIGNER}"
312312
git commit -a -m "Add ${VERSION} unsigned sigs for ${SIGNER}"
313313
popd
314314
fi
@@ -358,7 +358,7 @@ then
358358
echo "Signing ${VERSION} Windows"
359359
echo ""
360360
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
361-
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
361+
./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
362362
mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/${VERSION}
363363
mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/${VERSION}
364364
fi
@@ -369,7 +369,7 @@ then
369369
echo "Signing ${VERSION} Mac OSX"
370370
echo ""
371371
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
372-
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
372+
./bin/gsign -p "$signProg" --signer "$SIGNER" --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
373373
mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/${VERSION}/bitcoin-${VERSION}-osx.dmg
374374
fi
375375
popd
@@ -381,8 +381,8 @@ then
381381
echo ""
382382
echo "Committing ${VERSION} Signed Sigs"
383383
echo ""
384-
git add ${VERSION}-win-signed/${SIGNER}
385-
git add ${VERSION}-osx-signed/${SIGNER}
384+
git add ${VERSION}-win-signed/"${SIGNER}"
385+
git add ${VERSION}-osx-signed/"${SIGNER}"
386386
git commit -a -m "Add ${VERSION} signed binary sigs for ${SIGNER}"
387387
popd
388388
fi

0 commit comments

Comments
 (0)