git_update_all_branches.sh: improved functions
This commit is contained in:
parent
6211b64059
commit
54aa247e8e
|
@ -35,7 +35,7 @@ then
|
|||
fi
|
||||
|
||||
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 -E "^\*" | awk '{print $2}')"
|
||||
|
||||
HIDECURSOR
|
||||
echo -e ""
|
||||
|
@ -47,13 +47,11 @@ echo -e " x x"
|
|||
echo -e " mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj"
|
||||
WRITE
|
||||
|
||||
for f in $(${BINgit} -C "${gitreppath}" br -a | grep -v remotes | awk '{print $1}')
|
||||
for f in $(${BINgit} -C "${gitreppath}" br -a | grep -v remotes | sed -E 's/\* //g' | awk '{print $1}')
|
||||
do
|
||||
#echo "Updateing[${branchcounter}/${branchges}]: ${f}"
|
||||
showBar ${branchcounter} ${branchges} ${f} "[$((${branchcounter} + 1))/${branchges}]" #Call bar drawing function "showBar"
|
||||
${BINgit} -C "${gitreppath}" checkout "${f}" --quiet && ${BINgit} -C ${gitreppath} pull --rebase origin "${f}" --quiet >/dev/null 2>&1
|
||||
branchcounter=$((${branchcounter} + 1))
|
||||
#showBar ${branchcounter} ${branchges} ${f} "[$((${branchcounter} + 1))/${branchges}]" #Call bar drawing function "showBar"
|
||||
done
|
||||
showBar ${branchcounter} ${branchges} ${f} "[${branchcounter}/${branchges}]" #Call bar drawing function "showBar"
|
||||
${BINgit} -C "${gitreppath}" checkout "${activebranch}" --quiet
|
||||
|
|
Loading…
Reference in New Issue