1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/scripts/check-reqs.sh
Michael Adam 8d1cb29f48 scripts: quote array in check-reqs.sh for safety
This is how shellcheck complains:

SC2068: Double quote array expansions to avoid re-splitting elements.
SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 10:34:31 +02:00

22 lines
396 B
Bash
Executable File

#!/bin/bash
# Checks if the tools required for properly building, verifying and testing GlusterD are installed.
TOOLS=(dep gometalinter)
MISSING=0
for tool in "${TOOLS[@]}"; do
type "$tool" >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$tool package is missing on the system"
MISSING=1
else
echo "$tool package is available"
fi
done
if [ $MISSING -ne 0 ]; then
exit 1
fi