X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=blobdiff_plain;f=ls-status-carefully;h=cecdfa4ab079b759d469876b4d54a81271e25765;hp=eca5999e90a8d47ddec783756ea8810444803c16;hb=bd017bfadeaff71f34dbb38b1eac322ef52b7483;hpb=a0e50466264a400b9452a7c46d34f03c3bd70562 diff --git a/ls-status-carefully b/ls-status-carefully index eca5999..cecdfa4 100755 --- a/ls-status-carefully +++ b/ls-status-carefully @@ -1,12 +1,13 @@ #! /bin/sh +LSTMP="$HOME"/tmp/ls-status-carefully.tmp +export LSTMP +trap 'exec rm -rf "$LSTMP"' 0 HUP INT QUIT TERM + cd "`dirname \"$0\"`" && prog_dir="`pwd`" && -cd "$HOME"/tmp && rm -rf ls-status-carefully.tmp && +rm -rf "$LSTMP" && mkdir "$LSTMP" && -LSTMP="$HOME"/tmp/ls-status-carefully.tmp \ "$prog_dir"/do-all \ 'test "$g" = "$d/.git" || continue;' \ 'rsync -aW --del --protocol=28 "$d" "$LSTMP" && cd "$LSTMP/$b" &&' \ - 'test -n "`git status --short`" && echo "$d"' && - -cd "$HOME"/tmp && exec rm -rf ls-status-carefully.tmp + 'test -n "`git status --short`" && echo "$d"'