# 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"