From b3db31fc3669d28b03633a2b6405787710f78868 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Mon, 9 Mar 2015 13:53:02 +0100 Subject: [PATCH] pullSubtree.sh --- pullSubtree.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 pullSubtree.sh diff --git a/pullSubtree.sh b/pullSubtree.sh new file mode 100755 index 000000000..5f20f5123 --- /dev/null +++ b/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 +