[Project] extended checking out to support tag/branch

This commit is contained in:
Robert von Burg 2014-08-24 18:26:23 +02:00
parent 25b5c509c2
commit f3cbd5b7bb
1 changed files with 13 additions and 2 deletions

View File

@ -7,6 +7,7 @@ function logAheadCount() {
# if [ "${aheadCount}" -ne 0 ] ; then
project="${PWD}"
project="${project##*/}"
echo "== Status: ${project}..."
echo "${aheadCount} commits need pushing for ${project}"
# fi
}
@ -16,10 +17,20 @@ while read project; do
if [ "${project}" == "" ] ; then
continue;
fi
cd "${project}"
array=(${project//:/ })
name="${array[0]}"
tag="${array[1]}"
if [ "${name}" == "" ] || [ "${tag}" == "" ] ; then
echo -e "ERROR: Invalid project: ${project}! Must have form <git_name:tag>"
exit 1
fi
cd "${name}"
logAheadCount
cd ..
done < ${projectsFile}
echo "Done."
exit 0
exit 0