From a24eb9ac39d0b6bde1fc8ae2e4654cfc81e70b90 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 18 Feb 2009 16:56:01 +0100 Subject: [PATCH] Add better debug output to m4.sh and link.sh. --- link.sh | 5 +++-- m4.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.44.1