X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=status-dirty-carefully;h=4298b09425a2af5ea2fd0c780e431988924d759d;hb=2c654e316392a8b3523ea0495902372d54548e1c;hp=bdbf901b755934b23045f5727d78a76dd8771383;hpb=f0db190b61cc4659a0819b634adaa0992b109461;p=git-scripts.git diff --git a/status-dirty-carefully b/status-dirty-carefully index bdbf901..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 --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