From 658e5413346eeb9ed29bab6d1c4ba35ee9e2ee25 Mon Sep 17 00:00:00 2001
From: Dilawar Singh <dilawars@ncbs.res.in>
Date: Wed, 18 May 2016 13:35:49 +0530
Subject: [PATCH] Added scripts to pull subtree.

---
 scripts/pull_subtree.sh | 35 +++++++++++++++++++++++++++++++++++
 test_examples.sh        | 24 ------------------------
 update-repository       |  6 ------
 3 files changed, 35 insertions(+), 30 deletions(-)
 create mode 100755 scripts/pull_subtree.sh
 delete mode 100755 test_examples.sh
 delete mode 100755 update-repository

diff --git a/scripts/pull_subtree.sh b/scripts/pull_subtree.sh
new file mode 100755
index 00000000..30c9f71a
--- /dev/null
+++ b/scripts/pull_subtree.sh
@@ -0,0 +1,35 @@
+#!/bin/bash - 
+#===============================================================================
+#
+#          FILE: pull_subtree.sh
+# 
+#         USAGE: ./pull_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/test_examples.sh b/test_examples.sh
deleted file mode 100755
index bfa9d9a4..00000000
--- a/test_examples.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-set -e
-declare -i a
-PYC=`which python`
-RUNDIR=./_test_dir_moose-examples_
-echo "Creating $RUNDIR"
-mkdir -p $RUNDIR
-MATPLOTRC=data/matplotlibrc
-echo "copying examples out of source"
-cp -r moose-examples/* $RUNDIR/
-PYFILES=`find $RUNDIR -name "*.py"`
-for pyf in $PYFILES; do
-    let a=a+1
-    dn=`dirname $pyf`
-    fn=`basename $pyf`
-    # copy matplotlibrc file to working directory
-    cp $MATPLOTRC $dn/
-    (
-        cd $dn
-        echo "Executing $fn in directory $dn"
-        $PYC $fn
-    )
-done
-echo "Total $a scripts run"
diff --git a/update-repository b/update-repository
deleted file mode 100755
index 3447029a..00000000
--- a/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