Skip to content

Commit 75968eb

Browse files
committed
unpack-tarballs: fixed shellcheck issues
Signed-off-by: Lars Erik Wik <[email protected]>
1 parent a539fa4 commit 75968eb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build-scripts/unpack-tarballs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/sh -x
22

3-
. $(dirname "$0")/functions
3+
. "$(dirname "$0")"/functions
44
. detect-environment
55
. compile-options
66

77
SOURCE_TARBALL="$BASEDIR/output/tarballs/cfengine-3.*.tar.gz"
8-
MASTERFILES_TARBALL=$(ls $BASEDIR/output/tarballs/cfengine-masterfiles*.tar.gz | grep -v 'pkg.tar.gz$')
8+
MASTERFILES_TARBALL=$(grep -v 'pkg.tar.gz$' "$BASEDIR"/output/tarballs/cfengine-masterfiles*.tar.gz)
99

1010
# DELETE the git-checked-out directories, they are tainted with
1111
# ./configure artifacts anyway. The tarballs are unpacked and symlinked
@@ -23,17 +23,17 @@ if [ -e "$BASEDIR/core/" ] || [ -e "$BASEDIR/masterfiles/" ]; then
2323
exit 1
2424
fi
2525

26-
if [ x$PROJECT = xcommunity ]; then
26+
if [ "$PROJECT" = community ]; then
2727
sudo rm -rf "$BASEDIR/enterprise" "$BASEDIR/nova" "$BASEDIR/mission-portal"
2828
fi
2929

3030
# NATIVE TAR is being used on purpose, and *not* GNU TAR.
3131

3232
echo "UNPACKING SOURCE TARBALL AND SYMLINKING core"
33-
cd $BASEDIR
34-
gzip -dc $SOURCE_TARBALL | tar -xf -
33+
cd "$BASEDIR"
34+
gzip -dc "$SOURCE_TARBALL" | tar -xf -
3535
ln -s cfengine-3* core
3636

3737
echo "UNPACKING MASTERFILES TARBALL AND SYMLINKING masterfiles/"
38-
gzip -dc $MASTERFILES_TARBALL | tar -xf -
38+
gzip -dc "$MASTERFILES_TARBALL" | tar -xf -
3939
ln -s cfengine-masterfiles-* masterfiles

0 commit comments

Comments
 (0)