From f3cbd5b7bb1ecab3631b02019b24800bdf146178 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Sun, 24 Aug 2014 18:26:23 +0200 Subject: [PATCH] [Project] extended checking out to support tag/branch --- aheadStatus.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/aheadStatus.sh b/aheadStatus.sh index d52fcda15..e16b79424 100755 --- a/aheadStatus.sh +++ b/aheadStatus.sh @@ -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 " + exit 1 + fi + + cd "${name}" logAheadCount cd .. done < ${projectsFile} echo "Done." -exit 0 \ No newline at end of file +exit 0