blob: 46ad06d6e19c94f5ff2fb8a7c930e280d38ec1cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
# git-uptodate -- find out-of-date repositories
[ -z "$1" ] && { echo usage: $0 dir 1>&2; exit 1; }
find "$1" -type d -name .git |
while read -r dir; do
(
cd "$dir"/..
git status -uno | sed -n '/^Your branch/{s///;p}' |
while read -r s; do
cd -
printf '%s %s\n' "$(readlink -f "$dir"/..)" "$s"
break
done
)
done |
grep -v 'up to date'
|