X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=link.sh;h=f0f09177e6483acdf0bda12c37f3bb12a0a2fff6;hb=a24eb9ac39d0b6bde1fc8ae2e4654cfc81e70b90;hp=6a920381a5ba642448d23bbcc51bf01ee805eb06;hpb=454b9979982e1c9ada9d03d9a1fd74693a05de77;p=config%2Fdotfiles.git diff --git a/link.sh b/link.sh index 6a92038..f0f0917 100755 --- a/link.sh +++ b/link.sh @@ -19,16 +19,17 @@ cd "$base" # Abort if the target file exists and is no symbolic link. Prevents # overwriting real files. if [ -e "$target" -a ! -h "$target" ]; then - echo "target '$target' exists already and is no symbolic link!" >&2 + echo "link.sh: target '$target' exists already and is no symbolic link!" >&2 exit 1 fi # Make sure the source exists. if [ ! -e "$source" ]; then - echo "source '$source' doesn't exist!" >&2 + echo "link.sh: source '$source' doesn't exist!" >&2 exit 1 fi # Create the new symbolic link; remove the old one if necessary. +echo "link.sh: linking '$source' to '$target'" rm -f "$target" ln -s "$source" "$target"