From b521468ae5662361e58bda04eb4cc4861edb230a Mon Sep 17 00:00:00 2001 From: Brad Ganley Date: Wed, 13 Mar 2019 16:14:12 -0500 Subject: [PATCH] move your body every every body --- Arch/.bashrc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Arch/.bashrc b/Arch/.bashrc index d5160f2..403850a 100644 --- a/Arch/.bashrc +++ b/Arch/.bashrc @@ -53,18 +53,25 @@ export EDITOR='vim' export VISUAL='vim' tempdrive () { - $DIRECTORY=/mnt/RAM/ - if [ -z $@ ] - then - echo "Please provide a disk size in Mb." - else - if [ -d $DIRECTORY ] + if [ $@ == 0 ] then - sudo mkdir /mnt/RAM; - echo "Directory created" + sudo umount /mnt/RAM + sudo rm -rf /mnt/RAM + return + fi + if [ -z $@ ] + then + echo "Please provide a disk size in Mb." + else + if [ -d /mnt/RAM/ ] + then + echo "Directory exists" + else + sudo mkdir /mnt/RAM + echo "Directory created" + fi + sudo mount -t tmpfs tmpfs /mnt/RAM -o size=$@m; echo "$@M Disk created in RAM" fi - sudo mount -t tmpfs tmpfs /mnt/RAM -o size=$@m; echo "$@M Disk created in RAM" - fi } cd () {