diff --git a/run.sh b/run.sh index 5a36d86..9c57a9c 100755 --- a/run.sh +++ b/run.sh @@ -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..."