Started writing a configure script

This commit is contained in:
Jack-Benny Persson 2013-12-30 10:22:03 +01:00
parent 2c3830d50d
commit 886e2cc406

21
Labb8/ovning5/configure.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Jack-Benny Persson
# LX13
# Configuration script to update the hardcoded binaries
Binaries=(sed awk egrep mail printf cat grep mktemp rm tail)
# Check that they are all installed
for bin in ${Binaries[@]}; do
whereis $bin | awk '{ print $2 }' | grep $bin &> /dev/null
if [ $? -ne 0 ]; then
echo "It seems you system dosen't have $bin installed"
exit 1
fi
done
for i in ${Binaries[@]}; do