From 886e2cc406bd6fee1f5b6e11bee4c75de623eba3 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Mon, 30 Dec 2013 10:22:03 +0100 Subject: [PATCH] Started writing a configure script --- Labb8/ovning5/configure.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 Labb8/ovning5/configure.sh diff --git a/Labb8/ovning5/configure.sh b/Labb8/ovning5/configure.sh new file mode 100755 index 0000000..2d8e5af --- /dev/null +++ b/Labb8/ovning5/configure.sh @@ -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 + +