-update_repo()
-{
- local valid="0"
-
- if [ ${#} -ne 1 ]; then
- echo "Missing repository name"
- exit 1
- fi
-
- local r=${1}
-
- echo -n "Repo ${r}: "
-
- pushd "${r}" 1> /dev/null
- b=${branch}
-
- for b in ${branch} latest master; do
- exists=$(git show-ref refs/heads/${b})
- if [ -n "$exists" ]; then
- vco -q ${b} 1> /dev/null
- echo "${b}"
- valid="1"
- break
- fi
- done
-
- if [ x"${valid}" = x"0" ]; then
- echo "No valid branch found"
- fi
-
- popd 1> /dev/null
-}
-
-update_repo ./
-
-# Read list of repositories from file named .gitsubrepos
-while IFS=$'\n' read r ; do
- [[ "${r}" =~ \#.* ]] && continue # Skip comment lines
- [ -z ${r} ] && continue # Skip enmpty lines
-