X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=ls-not-pushed-carefully;h=266e4cad675142c627edd96827d703c6817c3f5b;hb=8bb709559b23d1da481df679eafe4bc9d078cd42;hp=0ae1935e3bccacec74c64a85c16afa17c8d0c3c5;hpb=79ba07250233fb6894906aba99726858c948ddea;p=git-scripts.git diff --git a/ls-not-pushed-carefully b/ls-not-pushed-carefully index 0ae1935..266e4ca 100755 --- a/ls-not-pushed-carefully +++ b/ls-not-pushed-carefully @@ -1,13 +1,14 @@ #! /bin/sh +LSTMP="$HOME"/tmp/ls-not-pushed-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-not-pushed-carefully.tmp && +rm -rf "$LSTMP" && mkdir "$LSTMP" && -LSTMP="$HOME"/tmp/ls-not-pushed-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 --branch --short | grep "ahead\|behind"`" && - echo "$d"' && - -cd "$HOME"/tmp && exec rm -rf ls-not-pushed-carefully.tmp + echo "$d"'