Managing git pull mesages
This commit is contained in:
parent
1eb6bba53b
commit
2561a9ce85
15
gitpuller.sh
15
gitpuller.sh
|
@ -32,15 +32,26 @@ PROGRESS_BAR_DISPLAY_COMPL=1
|
|||
puller() {
|
||||
SECONDS=0
|
||||
i=1
|
||||
reporting=false
|
||||
report=$'============================\nPulling generated messages :\n============================\n'
|
||||
|
||||
for repo in ${REPOS[@]}; do
|
||||
run_error=""
|
||||
echo $repo $i
|
||||
git -C $repo/.. pull > /dev/null
|
||||
run_error=$(git -C $repo/.. pull 2>&1 > /dev/null)
|
||||
if [[ $run_error ]]; then
|
||||
reporting=true
|
||||
report=$report$"* On $repo :"$'\n'"$run_error"$'\n'
|
||||
fi
|
||||
((i++))
|
||||
done
|
||||
duration=$SECONDS
|
||||
((i--))
|
||||
echo "[Finished] - Pulled $i/$PULL_ITER repositories in $((duration / 60)):$((duration % 60))"
|
||||
|
||||
if [ "$reporting" = true ]; then
|
||||
echo "$report"
|
||||
fi
|
||||
}
|
||||
|
||||
draw_progressbar() {
|
||||
|
@ -95,7 +106,7 @@ parse_output() {
|
|||
"$iteration" \
|
||||
"$PULL_ITER" \
|
||||
"$info"
|
||||
elif [[ "$line" =~ Finished ]]; then
|
||||
else
|
||||
printf >&2 "\033[0K\r"
|
||||
printf "%s\n" "$line"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user