diff --git a/scripts/prefix/bin/mvln b/scripts/prefix/bin/mvln index 80b1a4d..94a8e06 100755 --- a/scripts/prefix/bin/mvln +++ b/scripts/prefix/bin/mvln @@ -40,13 +40,13 @@ fi STATE="$STATE1$STATE2" case $STATE in [89]* ) - echo "$F1 is not a proper file (or a non-existent one)" - echo "Note that only regular files and directories are allowed" + >&2 echo "$F1 is not a proper file (or a non-existent one)" + >&2 echo "Note that only regular files and directories are allowed" exit $STATE ;; *[89] ) - echo "$F2 can not be created (containing directory does not exist)" - echo "or exists already (refusing to overwrite)" + >&2 echo "$F2 can not be created (containing directory does not exist)" + >&2 echo "or exists already (refusing to overwrite)" exit $STATE ;; [01]0 ) # file or dir to an existing dir @@ -68,7 +68,5 @@ esac #echo $DEGUB # Step 4: eventually act upon gathered knowledge ############################### -mv $PATH1 $PATH2 -cd $(dirname $PATH1) -ln -s $PATH2 $(basename $PATH1) - +ln $PATH1 $PATH2 # Hard link to new location (fast!) +ln -sf $PATH2 $PATH1 # Soft link back to old location