From 3047535cb51bf9ff6980841c0209c0d5fe998f3e Mon Sep 17 00:00:00 2001 From: Toby Batch Date: Wed, 29 Jun 2016 15:31:42 +0100 Subject: [PATCH] Improved the path of repos --- branches | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/branches b/branches index 5b34ec4..c5d66fe 100755 --- a/branches +++ b/branches @@ -26,13 +26,12 @@ Optional a new named branch can be created and checkout out/pulled. EOF } -while getopts "b:lpfa" options; do +while getopts "b:lpfh" options; do case $options in b) newbranch="$OPTARG";; l) latesttag=1;; p) plainoutput=1;; f) fetchorigin=1;; - a) autotag=1;; h) usage; exit;; esac done @@ -68,6 +67,7 @@ for var in "$ROOTPATH"; do for x in `find $var/* -name .git | grep -v vendor`; do dir=`dirname $x` name=`basename $dir` + clean_dir=${dir#$ROOTPATH/} if [ "$name" == "tabs-api-client" ] || [ "$name" == "contrib" ]; then continue fi @@ -81,19 +81,12 @@ for var in "$ROOTPATH"; do lt=`$GITCMD describe --abbrev=0 --tags 2> /dev/null` diff=`$GITCMD diff refs/heads/${branch}..refs/tags/${lt} 2> /dev/null` if [ ! -z "$diff" ]; then - printf "$COL_MAGENTA%-25s$COL_RESET %-20s $COL_RED%-10s$COL_RESET %s\n" $name $branch $lt $dir - if [ "$name" != "tabs-api-client" ] && [ "$name" != "phpcs" ]; then - if [ ! -z "$autotag" ]; then - drupal-tag -y -b patch $dir - else - EXITSTATE=$(($EXITSTATE + 1)) - fi - fi + printf "$COL_MAGENTA%-25s$COL_RESET %-20s $COL_RED%-10s$COL_RESET %s\n" $name $branch $lt $clean_dir else - printf "$COL_CYAN%-25s$COL_RESET %-20s %-10s %s\n" $name $branch $lt $dir + printf "$COL_CYAN%-25s$COL_RESET %-20s %-10s %s\n" $name $branch $lt $clean_dir fi else - printf "\n%-25s %-20s %s\n" $name $branch $dir + printf "%-25s %-20s %s\n" $name $branch $clean_dir fi if [ ! -z "$newbranch" ]; then # The --git-dir doesn't work in this case