From c31c9eb8f2234dad726f6a4712fcfcc07e0ba57e Mon Sep 17 00:00:00 2001 From: Dilawar Singh <dilawars@ncbs.res.in> Date: Sun, 26 Jun 2016 09:50:44 +0530 Subject: [PATCH] Scripts to pull the subtree into moose working tree. --- scripts/add_subtree.sh | 35 +++++++++++++++++++++++++++++++++++ scripts/pull_subtree.sh | 6 +++--- scripts/update-repository | 6 ------ 3 files changed, 38 insertions(+), 9 deletions(-) create mode 100755 scripts/add_subtree.sh delete mode 100755 scripts/update-repository diff --git a/scripts/add_subtree.sh b/scripts/add_subtree.sh new file mode 100755 index 00000000..2c19081b --- /dev/null +++ b/scripts/add_subtree.sh @@ -0,0 +1,35 @@ +#!/bin/bash - +#=============================================================================== +# +# FILE: add_subtree.sh +# +# USAGE: ./add_subtree.sh +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Dilawar Singh (), dilawars@ncbs.res.in +# ORGANIZATION: NCBS Bangalore +# CREATED: 05/18/2016 01:11:59 PM +# REVISION: --- +#=============================================================================== + +set -o nounset # Treat unset variables as an error +set -e +set -x + +if [[ `pwd` == *"/moose" ]]; then + + git subtree add --prefix moose-core \ + https://github.com/BhallaLab/moose-core master --squash + git subtree add --prefix moose-examples \ + https://github.com/BhallaLab/moose-examples master --squash + git subtree add --prefix moose-gui \ + https://github.com/BhallaLab/moose-gui master --squash + +else + echo "Run this script from top-level git directory." +fi diff --git a/scripts/pull_subtree.sh b/scripts/pull_subtree.sh index 30c9f71a..4836384b 100755 --- a/scripts/pull_subtree.sh +++ b/scripts/pull_subtree.sh @@ -23,11 +23,11 @@ set -x if [[ `pwd` == *"/moose" ]]; then - git subtree add --prefix moose-core \ + git subtree pull --prefix moose-core \ https://github.com/BhallaLab/moose-core master --squash - git subtree add --prefix moose-examples \ + git subtree pull --prefix moose-examples \ https://github.com/BhallaLab/moose-examples master --squash - git subtree add --prefix moose-gui \ + git subtree pull --prefix moose-gui \ https://github.com/BhallaLab/moose-gui master --squash else diff --git a/scripts/update-repository b/scripts/update-repository deleted file mode 100755 index 3447029a..00000000 --- a/scripts/update-repository +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# This script updates the repository and its subrepositories, recursively. - -git submodule update --init -git submodule foreach '[ "$path" = "moogli" ] && branch=geometry || branch=master; git pull origin $branch; git checkout $branch; git pull' -- GitLab