Parameterized install.sh script to allow specification of tag and repository.

This commit is contained in:
Eric Perry 2017-01-18 11:18:51 -05:00
parent 6907716831
commit 31a4ca502a

View File

@ -7,8 +7,8 @@ echo "\____/ \__._| .__/ \__. |\__\___|_| \____/ \_| \_/\___|_| |_| |_|\___
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 @@ echo ":: Installing python module C kernel."
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."