git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/aux/git-inventory
diff options
context:
space:
mode:
authorH. P. <harald.p.@xmart.de> 2018-11-01 13:30:58 +0100
committerH. P. <harald.p.@xmart.de> 2018-11-01 13:30:58 +0100
commit0632591996893fe136a1f2fe44d9b9f404f41f3e (patch)
tree7340edbe7c212da3db45a83219147143a3268c8d /documentation/aux/git-inventory
downloadfedora-laptop-0632591996893fe136a1f2fe44d9b9f404f41f3e.tar.bz2
Initial commit
Diffstat (limited to 'documentation/aux/git-inventory')
-rwxr-xr-xdocumentation/aux/git-inventory13
1 files changed, 13 insertions, 0 deletions
diff --git a/documentation/aux/git-inventory b/documentation/aux/git-inventory
new file mode 100755
index 0000000..182812a
--- /dev/null
+++ b/documentation/aux/git-inventory
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+SCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+source "$SCDIR/ctrl-c"||exit 1
+GITSYSFILE="$SCDIR/../git-system-repos"
+
+echo -n "Fetching system git stuff"
+(
+ true>"$GITSYSFILE";[ "$?" -ne 0 ]&&echo "...failed."&&exit 1||true
+ for i in $(find /usr/src -type d -name ".git"|sed 's|/[^/]\+$||g');do echo -n ".";echo "$i" >> "$GITSYSFILE";cd "$i";CDRETVAL=$?;git remote show origin 2>/dev/null|grep Fetch\ URL >> "$GITSYSFILE";[ "$CDRETVAL" -eq 0 ]&&cd - >/dev/null 2>&1;done
+)
+
+[ "$?" -ne 0 ]&&echo "failed."||echo "done."