being more careful and also adding dir del stopper
authorChris Koeritz <fred@gruntose.com>
Sun, 28 Aug 2022 21:28:32 +0000 (17:28 -0400)
committerChris Koeritz <fred@gruntose.com>
Sun, 28 Aug 2022 21:28:32 +0000 (17:28 -0400)
scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh

index ff273ba8f299eb28613e8ec3a057cdfa9caabbc5..596193cbb40b20229f2238850629b71302ffb506 100644 (file)
@@ -1,8 +1,12 @@
 #!/bin/bash
 
+FROOT=$HOME/disco
 
-mkdir $HOME/disco
-pushd $HOME/disco &>/dev/null
-mkdir -p burn converted grind rip
-popd &>/dev/null
-
+for dir in $FROOT $FROOT/burn $FROOT/converted $FROOT/grind $FROOT/rip; do
+  # make the currently chosen directory and ignore if already exists.
+  mkdir -p $dir
+#check_on_error
+  # put a sentinel file in the dir to keep it from being deleted.
+  echo keepy yo yes $RANDOM >>"$dir/.keep"
+#check_on_error
+done