*: fix shellcheck warnings

Fixes scripts and removes shellcheck warning suppressions.

* regexp warnings
* use ./*glob* so names don't become options
* use $(..) instead of legacy `..`
* read with -r to avoid mangling backslashes
* double quote to prevent globbing and word splitting
This commit is contained in:
Anthony Romano
2017-09-06 10:38:08 -07:00
parent 3c1845604b
commit 9abe9da9db
10 changed files with 149 additions and 147 deletions

View File

@@ -2,7 +2,7 @@
set -e
if ! [[ "$0" =~ "scripts/updatebom.sh" ]]; then
if ! [[ "$0" =~ scripts/updatebom.sh ]]; then
echo "must be run from repository root"
exit 255
fi
@@ -16,7 +16,7 @@ mkdir ./gopath
mv ./cmd/vendor ./gopath/src
echo "generating bill-of-materials.json"
GOPATH=`pwd`/gopath license-bill-of-materials \
GOPATH=$(pwd)/gopath license-bill-of-materials \
--override-file ./bill-of-materials.override.json \
github.com/coreos/etcd github.com/coreos/etcd/etcdctl > bill-of-materials.json