Skip to content

Commit

Permalink
Give summary of checkout failures
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
dfreedm committed Aug 22, 2013
1 parent b1d159f commit 13c344b
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions bin/pull-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ REPOS=(
labs
)

FAILED=()

err() {
echo -e "\033[5;1;31m$REPO FAILED TO CHECK OUT!\033[0m"
echo -e "\033[1;31m${#FAILED[@]} REPOS FAILED TO CHECK OUT!\033[0m"
for f in ${FAILED[@]}; do
echo -e "\033[1m$f\033[0m"
done
# Wait for user input
read
}

Expand All @@ -53,11 +59,10 @@ pull() {
git checkout master
git pull --rebase
if [ $? -ne 0 ]; then
err
FAILED+=($REPO)
else
ok
git submodule update --init --recursive
fi
git submodule update --init --recursive
popd >/dev/null 2>&1
}

Expand All @@ -81,3 +86,9 @@ if [ -d $REPO ]; then
else
checkout "git://github.com/web-animations/$REPO"
fi

if [[ ${#FAILED[@]} -gt 0 ]]; then
err
else
ok
fi

0 comments on commit 13c344b

Please sign in to comment.