-
-
Save capitalist/74fa8ce70520c1d92830256af1ddc60a to your computer and use it in GitHub Desktop.
Install Latest Julia Stable enviroment on Debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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