git_update_all_branches.sh: only update branches which are checked out already

This commit is contained in:
Oliver Schraml 2018-08-29 13:54:51 +02:00 committed by suchademon
parent 9184d50bdb
commit 6211b64059
Signed by: oliver.schraml
GPG Key ID: A55864B79D0D0228
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ then
fi fi
fi fi
branchges=$(${BINgit} -C "${gitreppath}" br -a | grep remotes | grep -v "remotes/origin/HEAD" | wc -l) branchges=$(${BINgit} -C "${gitreppath}" br -a | grep -v remotes | grep -v "remotes/origin/HEAD" | wc -l)
activebranch="$(${BINgit} -C "${gitreppath}" branch | grep "\*" | awk '{print $2}')" activebranch="$(${BINgit} -C "${gitreppath}" branch | grep "\*" | awk '{print $2}')"
HIDECURSOR HIDECURSOR
@ -47,7 +47,7 @@ echo -e " x x"
echo -e " mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj" echo -e " mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj"
WRITE WRITE
for f in $(${BINgit} -C "${gitreppath}" br -a | grep remotes | grep -v "remotes/origin/HEAD" | awk '{print $1}' | cut -f3 -d\/) for f in $(${BINgit} -C "${gitreppath}" br -a | grep -v remotes | awk '{print $1}')
do do
#echo "Updateing[${branchcounter}/${branchges}]: ${f}" #echo "Updateing[${branchcounter}/${branchges}]: ${f}"
showBar ${branchcounter} ${branchges} ${f} "[$((${branchcounter} + 1))/${branchges}]" #Call bar drawing function "showBar" showBar ${branchcounter} ${branchges} ${f} "[$((${branchcounter} + 1))/${branchges}]" #Call bar drawing function "showBar"