added git-survey, recurse over subdirs and check if there's anything to push

This commit is contained in:
randomuser 2022-03-22 22:17:27 -05:00
parent d9d7c028e9
commit 9c9eae22bb
2 changed files with 14 additions and 0 deletions

View File

@ -25,6 +25,7 @@ sh:
cp -f sh/start $(DESTDIR)$(PREFIX)/bin
cp -f sh/proxtest $(DESTDIR)$(PREFIX)/bin
cp -f sh/pco $(DESTDIR)$(PREFIX)/bin
cp -f sh/git-survey $(DESTDIR)$(PREFIX)/bin
mkc:
cc c/scream.c -o c/scream

13
sh/git-survey Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
for i in $(ls); do
cd $i
exists=$(
git status |\
grep 'Your branch is ahead of ' |\
wc -l
)
[ "$exists" -eq 0 ] || printf "> %s\n" "$i"
cd ..
done