]> git.karo-electronics.de Git - karo-tx-linux.git/blob - Next/fetch
Add linux-next specific files for 20131024
[karo-tx-linux.git] / Next / fetch
1 #!/bin/bash
2
3 exec 3> Next/SHA1s
4 echo "Name                    SHA1" >&3
5 echo "----                    ----" >&3
6
7 tail -n +5 < Next/Trees | while read tree type url; do
8         repository=${url%#*}
9         branch=${url#*#}
10
11         if test "x$type" != "xgit"; then
12                 echo "Don't know how to handle type $type trees, skipping $tree ($repository)..."
13                 continue
14         fi
15
16         git remote set-url ${tree} ${repository}
17
18         echo "Fetching tree $tree ($repository)..."
19
20         if ! git fetch $tree; then
21                 echo "ERROR: failed to fetch tree $tree, aborting..."
22                 exit 1
23         fi
24
25         hash=$(git show-ref --hash -- remotes/$tree/$branch)
26         printf "%-23s %s\n" $tree $hash >&3
27 done
28
29 exec 3>&-