Last active
April 20, 2017 13:18
-
-
Save inikulin/b8a9eea7fee5e3438925fb5a3981e777 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
parse5=(parse5 https://github.com/inikulin/parse5 1) | |
html=(html https://github.com/whatwg/html 0) | |
tests=(html5lib-tests https://github.com/html5lib/html5lib-tests 0) | |
htmlbuild=(html-build https://github.com/whatwg/html-build 0) | |
update() { | |
local init=1 | |
local repo=(${!1}) | |
if [ -d "${repo[0]}" ]; then | |
init=0 | |
fi | |
echo "--- UPDATING ${repo[0]} ---" | |
if [ "${init}" == "1" ]; then | |
git clone https://github.com/HTMLParseErrorWG/${repo[0]} | |
fi | |
cd ${repo[0]} | |
if [ "${init}" == "1" ]; then | |
git remote add upstream ${repo[1]} | |
fi | |
git pull --rebase | |
git fetch upstream | |
git rebase upstream/master | |
if [ "${init}" == "1" ] && [ "${repo[2]}" == "1" ]; then | |
npm install | |
fi | |
cd ../ | |
} | |
update parse5[@] && | |
update html[@] && | |
update htmlbuild[@] && | |
update tests[@] |
Author
inikulin
commented
Apr 20, 2017
�
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment