forked from startup-class/setup
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.sh
44 lines (39 loc) · 1.03 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#Bash Script for installation testing
#Link: http://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script
echo "Testing Basic dependencies:"
for cmd in "git" "gcc" "g++" "autoconf" "automake" "libtool" "python" "make" ; do
printf "%-30s" "$cmd"
if hash "$cmd" 2>/dev/null; then
printf "OK\n";
else
printf "missing\n";
fi
done
echo -e "\nTesting Basic command line editor installations:"
for cmd in "rlwrap" "emacs" "nano"; do
printf "%-30s" "$cmd"
if hash "$cmd" 2>/dev/null; then
printf "OK\n";
else
printf "missing\n";
fi
done
echo -e "\nTesting Node.JS installations:"
for cmd in "node" "nvm" "npm" "heroku" "foreman"; do
printf "%-30s" "$cmd"
if hash "$cmd" 2>/dev/null; then
printf "OK\n";
else
printf "missing\n";
fi
done
echo -e "\nTesting MEAN JS Stack installations:"
for cmd in "mongo" "mongod" "mean" "bower" "grunt"; do
printf "%-30s" "$cmd"
if hash "$cmd" 2>/dev/null; then
printf "OK\n";
else
printf "missing\n";
fi
done