X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=status-dirty-carefully;h=4298b09425a2af5ea2fd0c780e431988924d759d;hb=2c654e316392a8b3523ea0495902372d54548e1c;hp=065dac07c9faa9c7c6be89552a9193f804555d41;hpb=8ed233c6fbdb88363fc54279c0a044413b137c54;p=git-scripts.git diff --git a/status-dirty-carefully b/status-dirty-carefully index 065dac0..4298b09 100755 --- a/status-dirty-carefully +++ b/status-dirty-carefully @@ -1,13 +1,14 @@ #! /bin/sh -cd "`dirname \"$0\"`" && PROG_DIR="`pwd`" && -cd "$HOME"/tmp && rm -rf status-dirty-carefully.tmp && +STMP="$HOME"/tmp/status-dirty-carefully.tmp +export STMP +trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM -LSTMP="$HOME"/tmp/status-dirty-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 -s`" && echo "----- $d -----" &&' \ - 'git status --branch' && +cd "`dirname \"$0\"`" && prog_dir="`pwd`" && +rm -rf "$STMP" && mkdir "$STMP" && -cd "$HOME"/tmp && exec rm -rf 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