From eca14edcdb9e42d247e9d6521fd1c496171739a4 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 28 Aug 2022 17:28:32 -0400 Subject: [PATCH] being more careful and also adding dir del stopper --- .../fred/scripts/rip_burn/create_disco_dirs.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh b/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh index ff273ba8..596193cb 100644 --- a/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh +++ b/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh @@ -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 -- 2.34.1