aboutsummaryrefslogtreecommitdiff
path: root/package-source.bash
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-04-13 13:09:27 +0200
committerJakob Unterwurzacher2020-04-13 14:54:04 +0200
commit9a7ceef09ea1fc8cbe17b324a9d1a2e71e50cb0a (patch)
treee0806ffcfe2095525d655b15cd7034ef92ee590d /package-source.bash
parenta2ad14b9ac92384f7cc0e8a0d8f385a9cd9a299a (diff)
shellcheck: make top-level bash scripts warning-free
And run shellcheck in test.bash.
Diffstat (limited to 'package-source.bash')
-rwxr-xr-xpackage-source.bash12
1 files changed, 6 insertions, 6 deletions
diff --git a/package-source.bash b/package-source.bash
index bc9e249..4d0c24d 100755
--- a/package-source.bash
+++ b/package-source.bash
@@ -6,17 +6,17 @@ git_archive_extra() {
local PREFIX=$1
shift
# Add files tracked in git
- git archive --prefix "$PREFIX/" -o $PREFIX.tar HEAD
+ git archive --prefix "$PREFIX/" -o "$PREFIX.tar" HEAD
# Add "extra" files
- tar --owner=root --group=root --transform "s!^!$PREFIX/!" --append -f $PREFIX.tar "$@"
+ tar --owner=root --group=root --transform "s!^!$PREFIX/!" --append -f "$PREFIX.tar" "$@"
# Compress
- gzip -f $PREFIX.tar
+ gzip -f "$PREFIX.tar"
}
cd "$(dirname "$0")"
GITVERSION=$(git describe --tags --dirty)
-echo $GITVERSION > VERSION
+echo "$GITVERSION" > VERSION
# Render the manpages and include them in the tarball. This
# avoids a build-dependency to pandoc.
@@ -24,12 +24,12 @@ echo $GITVERSION > VERSION
# gocryptfs source tarball
PREFIX_SRC_ONLY=gocryptfs_${GITVERSION}_src
-git_archive_extra $PREFIX_SRC_ONLY VERSION Documentation/*.1
+git_archive_extra "$PREFIX_SRC_ONLY" VERSION Documentation/*.1
# gocryptfs source + dependencies tarball
dep ensure
PREFIX_SRC_DEPS=gocryptfs_${GITVERSION}_src-deps
-git_archive_extra $PREFIX_SRC_DEPS VERSION Documentation/*.1 vendor
+git_archive_extra "$PREFIX_SRC_DEPS" VERSION Documentation/*.1 vendor
rm VERSION