blob: 182812afaf46bfc91336415e96c7792263546a13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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."
|