From: Oleg Broytman Date: Tue, 7 Apr 2015 21:20:36 +0000 (+0300) Subject: Use `dirname $0` instead of absolute path X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=427017c989cca51ebdef122dcf94fd490b5a104b;p=git-scripts.git Use `dirname $0` instead of absolute path --- 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'