-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·41 lines (32 loc) · 897 Bytes
/
install.sh
File metadata and controls
executable file
·41 lines (32 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
if [ -z $1 ] ; then
echo "Please specifiy an installation directory."
exit 1
fi
set -u
KERNEL_DIR=$1
if [ ! -e $KERNEL_DIR ] ; then
echo "The directory $KERNEL_DIR does not exist. Woud you like to create it? [Y/n]"
read response
if [ $response = 'n' or $response = 'N' ] ; then
echo "Aborting."
exit 1
fi
mkdir -p $KERNEL_DIR
fi
echo "Installing the kernel to $KERNEL_DIR"
VERSION=`cat VERSION`
# The name of the distribution directory to create.
NAME=jupyter-lsd-kernel
JAR=$NAME-$VERSION.jar
DIST=target/$NAME
echo "Copying the kernel to the dist directory."
if [ ! -e $DIST ] ; then
mkdir -p $DIST
fi
cp target/$JAR $KERNEL_DIR
cat src/distribution/kernel.json | sed "s|__PATH__|$KERNEL_DIR/$JAR|" > $DIST/kernel.json
echo "Installing the Groovy kernel"
jupyter kernelspec install --replace --name lsd $DIST
echo "Done."