From 427017c989cca51ebdef122dcf94fd490b5a104b Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 8 Apr 2015 00:20:36 +0300 Subject: [PATCH] Use `dirname $0` instead of absolute path --- touch-ALL-repos | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/touch-ALL-repos b/touch-ALL-repos index fd63f0e..3454a6e 100755 --- a/touch-ALL-repos +++ b/touch-ALL-repos @@ -1,6 +1,9 @@ #! /bin/sh -exec "`dirname \"$0\"`"/do-all \ +cd "`dirname \"$0\"`" && +prog_dir="`pwd`" && + +exec "$prog_dir"/do-all \ 'test "$g" = "$d/.git" || continue; cd "$d" &&' \ - 'echo "$d" && "$HOME"/admin/prog/git-scripts/touch-all &&' \ - 'git submodule foreach "$HOME"/admin/prog/git-scripts/touch-all' + 'echo "$d" && "$prog_dir"/touch-all &&' \ + 'git submodule foreach "$prog_dir"/touch-all' -- 2.39.5