From: Simon Ruderich Date: Wed, 18 Feb 2009 15:56:01 +0000 (+0100) Subject: Add better debug output to m4.sh and link.sh. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=a24eb9ac39d0b6bde1fc8ae2e4654cfc81e70b90;p=config%2Fdotfiles.git Add better debug output to m4.sh and link.sh. --- 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" diff --git a/m4.sh b/m4.sh index b4a935c..92e9439 100755 --- a/m4.sh +++ b/m4.sh @@ -21,4 +21,5 @@ echo "# It was generated from $file.m4 on `date`." >> $file echo >> $file # Process $1.m4 with m4 using the given options. +echo "m4.sh: generating '$file' from '$file.m4' with options '$*'" m4 $* $file.m4 >> $file