#! /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"'
#! /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"'
#! /bin/sh
+STMP="$HOME"/tmp/status-dirty-carefully.tmp
+export STMP
+trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM
+
cd "`dirname \"$0\"`" && prog_dir="`pwd`" &&
-cd "$HOME"/tmp && rm -rf status-dirty-carefully.tmp &&
+rm -rf "$STMP" && mkdir "$STMP" &&
-STMP="$HOME"/tmp/status-dirty-carefully.tmp &&
for d in `"$prog_dir"/ls-dirty`
do
echo "----- $d -----" && rsync -aW --del --protocol=28 "$d" "$STMP" &&
- cd "$STMP/`basename $d`" && git status --branch
-done &&
-
-cd "$HOME"/tmp && exec rm -rf status-dirty-carefully.tmp
+ cd "$STMP/`basename \"$d\"`" && git status --branch
+done