changeset 538:f57d4fb7d7c5

Add logging what action exactly have place.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 20 Nov 2012 00:03:37 +0200
parents bb15ab8658ab
children 281c746e1e6f
files misc/mymake.sh
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/misc/mymake.sh	Mon Nov 19 23:59:00 2012 +0200
+++ b/misc/mymake.sh	Tue Nov 20 00:03:37 2012 +0200
@@ -10,25 +10,31 @@
   fi
 done
 
+execute() {
+  echo "** cd $PWD"
+  echo "**" "$@"
+  exec "$@"
+}
+
 dir="$PWD"
 while [[ -n "$dir" ]]; do
   cd "$dir"
   if [[ -f "$dir"/"$fname" ]]; then
     if [[ $fname == *[mM]ake* ]]; then
-      exec make "$@"
+      execute make "$@"
     else
       echo "Can't recognise '$fname' type."
       exit 1
     fi
   fi
   if [[ -f "$dir"/Makefile ]]; then
-    exec make "$@"
+    execute make "$@"
   fi
   if [[ -f "$dir"/build.xml ]]; then
-    exec ant -e "$@"
+    execute ant -e "$@"
   fi
   if [[ -f "$dir"/pom.xml ]]; then
-    exec mvn "$@"
+    execute mvn "$@"
   fi
   dir=${dir%/*}
 done