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