Update v-move-folder-and-make-symlink

This commit is contained in:
myvesta 2022-12-29 13:44:40 +01:00 committed by GitHub
commit 75e7d7c5e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,6 +35,16 @@ if [ ! -d "$FROMFOLDER" ]; then
exit 1
fi
if [ -L "$FROMFOLDER" ]; then
echo "Folder $FROMFOLDER is already symlink, aborting"
exit 1
fi
if [ -d "$TOFOLDER" ]; then
echo "Folder $TOFOLDER already exists, aborting"
exit 1
fi
USER=$(stat -c '%U' "$FROMFOLDER")
GROUP=$(stat -c '%G' "$FROMFOLDER")
PARENTFOLDER=$(dirname "$TOFOLDER")