Browse Source

pullSubtree.sh

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
b3db31fc36
  1. 32
      pullSubtree.sh

32
pullSubtree.sh

@ -0,0 +1,32 @@
# usage
# ./pullsubtree [repository branch] [repository2 branch2]
#
# example
# ./pullSubtree evmjit master
# ./pullSubtree ethereumjs develop
# ./pullSubtree evmjit master ethereumjs master
evmjit_repo="https://github.com/ethereum/evmjit"
evmjit_location="evmjit"
ethereumjs_repo="https://github.com/ethereum/ethereum.js"
ethereumjs_location="libjsqrc/ethereumjs"
natspecjs_repo="https://github.com/ethereum/natspec.js"
natspecjs_location="libnatspec/natspecjs"
while [ "$1" != "" ]; do
case $1 in
evmjit | ethereumjs | natspecjs )
REPO="${1}_repo"
REPO=${!REPO}
LOCATION="${1}_location"
LOCATION=${!LOCATION}
shift
BRANCH=$1
git subtree pull --prefix=${LOCATION} ${REPO} ${BRANCH} --squash
;;
esac
shift
done
Loading…
Cancel
Save