changeset 48:d3fdb29f3fdc

Parameterized install.sh script to allow specification of tag and repository.
author Eric Perry <eric@ericjperry.com>
date Wed, 18 Jan 2017 11:18:51 -0500
parents 69fc0b9c02b8
children 94feb0290715
files install.sh
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/install.sh	Wed Jun 08 11:44:17 2016 +0100
+++ b/install.sh	Wed Jan 18 11:18:51 2017 -0500
@@ -7,8 +7,8 @@
 echo "            | |     __/ |                                                    "
 echo "            |_|    |___/                                                     "
 
-
-repository="https://github.com/brendan-rius/jupyter-c-kernel.git"
+tag_name="$1"
+repository="${2:-https://github.com/brendan-rius/jupyter-c-kernel.git}"
 repo_name="jupyter-c-kernel"
 
 set -x
@@ -17,6 +17,10 @@
 pip install $repo_name; echo "Done. "
 echo ":: Cloning Jupyter C-kernel... "
 git clone $repository $repo_name; echo "Done. "
+if [ ! -z "$tag_name" ]; then
+    echo ":: Using tag $tag_name"
+    git checkout "$tag_name"; echo "Done."
+fi
 echo ":: Installing kernel specification"
 cd $repo_name
 jupyter-kernelspec install c_spec/ ; echo "Done."