Skip to content

Commit 1bb92f6

Browse files
committed
shellcheck create_dummy_box.sh
Signed-off-by: Thomas Sjögren <[email protected]>
1 parent 3138a92 commit 1bb92f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/tools/create_dummy_box.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ if [ $# -ne 1 ]; then
88
exit 1
99
fi
1010

11-
if [ -f "$DIR/dummy.box" ]; then
11+
if [ -f "${DIR}/dummy.box" ]; then
1212
echo "Box already created"
1313
exit 0
1414
fi
1515

1616
PROVIDER="$1"
17-
TMPDIR=`mktemp -d`
18-
cd "$TMPDIR"
17+
TMPDIR="$(mktemp -d)"
18+
cd "${TMPDIR}" || exit 1
1919
echo "{ \"provider\": \"$PROVIDER\"}" > metadata.json
20-
tar czf "$DIR/dummy-$PROVIDER.box" .
21-
cd "$DIR"
22-
rm -rf "$TMPDIR"
20+
tar czf "${DIR}/dummy-$PROVIDER.box" .
21+
cd "${DIR}" || exit 1
22+
rm -rvf "${TMPDIR}"

0 commit comments

Comments
 (0)