diff --git a/genswap.sh b/genswap.sh index ff30b9c..b8a951f 100755 --- a/genswap.sh +++ b/genswap.sh @@ -6,7 +6,10 @@ TOTALRAM=$(free -m | gawk '/Mem:/{print $2}') VERSION="0.1.0" BUILDDATE="2018-06-05" - +if [ ! -f /usr/bin/gawk ];then + echo -e "\nPlease install 'gawk' with your package manager\n" + exit 0 +fi function autoSwap(){ echo -e "\nTotal Physical RAM is: ${TOTALRAM} MB\n" echo -e "\nCreating a ${TOTALRAM} MB file in:${SWAPPATH}..\n"