33# reset variable so it doesn't use the environment one
44MISSING=
55
6- echo -n " Checking for mdbook-linkcheck ... "
6+ printf " Checking for mdbook-linkcheck ... "
77if ! command -v mdbook-linkcheck; then
88 MISSING=" $MISSING mdbook-linkcheck"
99 echo " not found"
1010fi
1111
12- echo -n " Checking for vmdfmt ... "
12+ printf " Checking for vmdfmt ... "
1313if ! command -v vmdfmt; then
1414 MISSING=" $MISSING vmdfmt"
1515 echo " not found"
1616fi
1717
1818if [ " $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
6060
6161vmdfmt -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
6666else
0 commit comments