genswap.sh: check for gawk before main
Former-commit-id: dfc001cb8a93ef514d938785f6216ead503833bd
This commit is contained in:
parent
b5f4253782
commit
6b6c066d7a
@ -6,7 +6,10 @@ TOTALRAM=$(free -m | gawk '/Mem:/{print $2}')
|
|||||||
VERSION="0.1.0"
|
VERSION="0.1.0"
|
||||||
BUILDDATE="2018-06-05"
|
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(){
|
function autoSwap(){
|
||||||
echo -e "\nTotal Physical RAM is: ${TOTALRAM} MB\n"
|
echo -e "\nTotal Physical RAM is: ${TOTALRAM} MB\n"
|
||||||
echo -e "\nCreating a ${TOTALRAM} MB file in:${SWAPPATH}..\n"
|
echo -e "\nCreating a ${TOTALRAM} MB file in:${SWAPPATH}..\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user