OILS / demo / julia.sh View on Github | oilshell.org

31 lines, 17 significant
1#!/usr/bin/env bash
2#
3# Usage:
4# demo/julia.sh <function name>
5
6set -o nounset
7set -o pipefail
8set -o errexit
9
10download() {
11 # 139 MB
12 wget --directory _tmp --no-clobber \
13 'https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.3-linux-x86_64.tar.gz'
14}
15
16# TODO: should make a wedge that's lazy
17extract() {
18 pushd _tmp
19 time tar -x -z < julia-*.tar.gz
20 popd
21}
22
23julia() {
24 _tmp/julia-*/bin/julia "$@"
25}
26
27demo() {
28 julia -e 'print("hi from Julia\n")'
29}
30
31"$@"