X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=ls-status-carefully;h=cecdfa4ab079b759d469876b4d54a81271e25765;hb=8bb709559b23d1da481df679eafe4bc9d078cd42;hp=eca5999e90a8d47ddec783756ea8810444803c16;hpb=41ea14fad3d8501191886b656c0f7bca6680a406;p=git-scripts.git 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"'