From a2c685f04294da1da671bfb378514b12f8532c97 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 25 Mar 2022 01:56:54 +0430 Subject: scotch now leaves normal data alone. added battery to tmux. --- sh/lib.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'sh') diff --git a/sh/lib.sh b/sh/lib.sh index 1ce5acb..64ba3f7 100644 --- a/sh/lib.sh +++ b/sh/lib.sh @@ -53,3 +53,31 @@ copy_pam_mod_deps() { copy_to_stash $MOD_ABS "$DEP_LIST" $2 $3 done } + +dig() { + globalholecounter=0 + if test "$("ls" -A "/home/devi/devi/abbatoir")"; then + while [ 1 ]; do + if [ -d "/home/devi/devi/abbatoir/hole$globalholecounter" ]; then + # if its not empty + if test "$("ls" -A "/home/devi/devi/abbatoir/hole$globalholecounter")"; then + : + # if its empty + else + cd /home/devi/devi/abbatoir/hole$globalholecounter + break + fi + else + mkdir /home/devi/devi/abbatoir/hole$globalholecounter + cd /home/devi/devi/abbatoir/hole$globalholecounter + echo $globalholecounter + break + fi + $((globalholecounter=globalholecounter+1)) + done + else + mkdir /home/devi/devi/abbatoir + mkdir /home/devi/devi/abbatoir/hole$globalholecounter + cd /home/devi/devi/abbatoir/hole$globalholecounter + fi +} -- cgit v1.2.3