mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-18 21:41:52 +03:00
adcd96fa47
This commit brings the notebook into the rest of the distribution infrastructure set up for cryptol. The main points are: - new icryptol-kernel executable - new icryptol shell script that wraps ipython and makes sure the cryptol profile is set up - Makefile target for friendly local testing (`make notebook`) - moved example notebooks to examples subdirectory
36 lines
1.1 KiB
Bash
Executable File
36 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# icryptol
|
|
# Author: acfoltzer@galois.com
|
|
# Copyright Galois, Inc. 2015
|
|
|
|
# Driver script for the icryptol notebook interface. This is a thin
|
|
# wrapper around the ipython command line interface, and will in fact
|
|
# forward along any arguments to the invocation of `ipython notebook`.
|
|
#
|
|
# This script attempts to be location-agnostic but currently assumes a
|
|
# POSIX layout for the installation of the icryptol-kernel executable
|
|
# and the profile.tar that contains the basic cryptol profile for
|
|
# IPython. By setting the IPYTHONDIR environment variable, you can
|
|
# control where this profile is created (by default it should be in
|
|
# $HOME/.ipython).
|
|
|
|
set -e
|
|
|
|
command -v ipython >/dev/null 2>&1 || {
|
|
echo >&2 "Error: ipython not found in \$PATH"
|
|
exit 1
|
|
}
|
|
|
|
command -v icryptol-kernel >/dev/null 2>&1 || {
|
|
echo >&2 "Error: icryptol-kernel not found in \$PATH"
|
|
exit 1
|
|
}
|
|
|
|
ipython locate profile cryptol 2>&1 || {
|
|
tar -C $IPYTHONDIR \
|
|
-xf $(dirname $(which icryptol-kernel))/../share/icryptol/profile.tar
|
|
}
|
|
|
|
ipython notebook --profile=cryptol $@
|