allowed for 'issue handling' which is the same as my error handling but doesn't quit the program. Allows for there to be non-fatal issues without the program quitting

This commit is contained in:
Michael Scalzetti 2022-03-27 20:10:03 -04:00
parent f25bc45dd7
commit 72a1198e50

16
run.sh
View File

@ -3,10 +3,14 @@ MOUNT_NAME=priv
MOUNT_DIR=/media/michael/priv
error(){
echo $1
echo "!\t$1"
exit 1
}
issue(){
echo "!\t$1"
}
clear
@ -29,19 +33,19 @@ ln -s "$MOUNT_DIR/notes" ./data.link ||\
echo "Starting container..."
docker run --name priv --rm -it -v `pwd`/data.link/:/notes `docker build -q .` ||\
error "Issue making docker container... quitting..."
docker run --name priv --rm -it -v `pwd`/data.link/:/notes `docker build -q .`
echo "Unmounting db..."
umount -f "$MOUNT_DIR" &&\
umount -f "$MOUNT_DIR" ||\
issue "Issue unmounting $DEV_USB..."
rm -rf $MOUNT_DIR ||\
error "Issue unmounting and deleting mountpoint... quitting..."
issue "Issue deleting mountpoint..."
echo "Removing link..."
rm -rf ./data.link
error "Issue deleting link... quitting..."
issue "Issue deleting link..."
echo "Locking db..."