diff options
author | H. P. <harald.p.@bechtle.com> | 2019-11-25 10:04:43 +0100 |
---|---|---|
committer | H. P. <harald.p.@bechtle.com> | 2019-11-25 10:04:43 +0100 |
commit | 737cf3c79a03489a53b250cf53cf2a8f53f603a4 (patch) | |
tree | f6bd73a2c3a78e3731c413d4ebd09fc47c477139 /documentation/aux/git-inventory | |
parent | 7bde242bc4d99505955f023b4a71aa08b3a762fd (diff) | |
download | rhel-scripts-737cf3c79a03489a53b250cf53cf2a8f53f603a4.tar.bz2 |
+documentation scripts
Diffstat (limited to 'documentation/aux/git-inventory')
-rwxr-xr-x | documentation/aux/git-inventory | 13 |
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." |