]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Add better debug output to m4.sh and link.sh.
authorSimon Ruderich <simon@ruderich.org>
Wed, 18 Feb 2009 15:56:01 +0000 (16:56 +0100)
committerSimon Ruderich <simon@ruderich.org>
Wed, 18 Feb 2009 15:56:01 +0000 (16:56 +0100)
link.sh
m4.sh

diff --git a/link.sh b/link.sh
index 6a920381a5ba642448d23bbcc51bf01ee805eb06..f0f09177e6483acdf0bda12c37f3bb12a0a2fff6 100755 (executable)
--- 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 b4a935c3ed8a3bf99f5f0142cf9602f59e4d2627..92e9439be35265dffdfc6471e17f35aa816cdcb7 100755 (executable)
--- 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