]> git.phdru.name Git - git-scripts.git/commitdiff
Add all-status all-status-carefully
authorOleg Broytman <phd@phdru.name>
Fri, 14 Oct 2016 22:15:22 +0000 (01:15 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 14 Oct 2016 22:24:36 +0000 (01:24 +0300)
all-status [new file with mode: 0755]
all-status-carefully [new file with mode: 0755]

diff --git a/all-status b/all-status
new file mode 100755 (executable)
index 0000000..6f11e59
--- /dev/null
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+prog_dir=`dirname "$0"`
+"$prog_dir"/do-all \
+   'echo "----- $d -----" && cd "$d" &&' \
+   'git status --short --branch || exit 1'
diff --git a/all-status-carefully b/all-status-carefully
new file mode 100755 (executable)
index 0000000..8a767d2
--- /dev/null
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+STMP="$HOME"/tmp/all-status-carefully.tmp
+export STMP
+trap 'exec rm -rf "$STMP"' 0 HUP INT QUIT TERM
+
+cd "`dirname \"$0\"`" && prog_dir="`pwd`" &&
+rm -rf "$STMP" && mkdir "$STMP" &&
+
+"$prog_dir"/do-all \
+   'rsync -aW --del --protocol=28 "$d" "$STMP" && cd "$STMP/$b" &&' \
+   'test -n "`git status --short`" && echo "----- $d -----" &&' \
+   'git status --short --branch'