aboutsummaryrefslogtreecommitdiffstats
path: root/sh/lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/lib.sh')
-rw-r--r--sh/lib.sh28
1 files changed, 28 insertions, 0 deletions
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
+}