Skip to content

Instantly share code, notes, and snippets.

@capitalist
Forked from moisespsena/julia-env.sh
Last active May 13, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capitalist/74fa8ce70520c1d92830256af1ddc60a to your computer and use it in GitHub Desktop.
Save capitalist/74fa8ce70520c1d92830256af1ddc60a to your computer and use it in GitHub Desktop.
Install Latest Julia Stable enviroment on Debian
#!/bin/bash
SD=$(dirname $(realpath "$0")) || exit 1
[ `arch` = 'x86_64' ] && url='https://julialang.s3.amazonaws.com/bin/linux/x64/0.5/julia-0.5.2-linux-x86_64.tar.gz' \
|| url='https://julialang.s3.amazonaws.com/bin/linux/x86/0.5/julia-0.5.2-linux-i686.tar.gz'
echo $url
tmpd="$SD/tmp"
[ ! -d "$tmpd" ] && mkdir -v "$tmpd"
file_name="$tmpd/"$(echo "$url" | perl -pe 's/^.+\/([^\/]+)$/\1/g')
wget -cv "$url" -O "$file_name" || exit 1
dir_name=$(tar tzf "$file_name" | head -n 1) || exit 1
JD="$SD/tmp/$dir_name"
WD=$(dirname "$SD") || exit 1
if [ ! -d "$JD" ]; then
tar -zxvf "$file_name" -C "$SD/tmp" || exit 1
fi
rm -fv "$WD/work"
ln -sv "$JD" "$WD/work"
"$WD/work/bin/julia" -e 'Pkg.update();Pkg.add("ElasticFDA")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment