Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.