Skip to content

Commit bc4333f

Browse files
committed
check.sh: shellcheck
1 parent 20d7b37 commit bc4333f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

check.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
# reset variable so it doesn't use the environment one
44
MISSING=
55

6-
echo -n "Checking for mdbook-linkcheck ... "
6+
printf "Checking for mdbook-linkcheck ... "
77
if ! command -v mdbook-linkcheck; then
88
MISSING="$MISSING mdbook-linkcheck"
99
echo "not found"
1010
fi
1111

12-
echo -n "Checking for vmdfmt ... "
12+
printf "Checking for vmdfmt ... "
1313
if ! command -v vmdfmt; then
1414
MISSING="$MISSING vmdfmt"
1515
echo "not found"
1616
fi
1717

1818
if [ "$MISSING" ]; then
1919

20-
echo -n "Checking for xbps-install ... "
20+
printf "Checking for xbps-install ... "
2121
if ! command -v xbps-install; then
2222
echo "not found"
2323
echo "Please manually install: $MISSING"
2424
exit 1
2525
fi
2626

27-
echo -n "Checking for sudo ... "
27+
printf "Checking for sudo ... "
2828
if command -v sudo; then
2929
SU_CMD='sudo'
3030
else
@@ -39,14 +39,14 @@ if [ "$MISSING" ]; then
3939
fi
4040
fi
4141

42-
echo "\nTrying to install ${MISSING## } ... "
42+
printf "\nTrying to install %s ... " "${MISSING## }"
4343
$SU_CMD xbps-install $MISSING
4444
echo
4545

4646
# Check whether executables are now present.
47-
47+
4848
for i in $MISSING; do
49-
if ! command -v $i 2>&1 >/dev/null; then
49+
if ! command -v "$i" >/dev/null 2>&1; then
5050
UNAVAILABLE="$UNAVAILABLE $i"
5151
fi
5252
done
@@ -60,7 +60,7 @@ fi
6060

6161
vmdfmt -l -w src/
6262

63-
if command -v mdbook 2>&1 >/dev/null; then
63+
if command -v mdbook >/dev/null 2>&1; then
6464
echo "Building book and checking links with mdbook ..."
6565
mdbook build
6666
else

0 commit comments

Comments
 (0)