Skip to content

Instantly share code, notes, and snippets.

@GONZALORUIZ
Last active May 8, 2017 13:24
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 GONZALORUIZ/be444c9ea1e43e6c5f8f797e07f4a5e5 to your computer and use it in GitHub Desktop.
Save GONZALORUIZ/be444c9ea1e43e6c5f8f797e07f4a5e5 to your computer and use it in GitHub Desktop.
Delete and Reinstall Previous Spark Julia Package
#!/usr/bin/env bash
# install julia
JULIA_HOME=/usr/local/julia-6445c82d00
# maven
export M2_HOME=/usr/local/apache-maven-3.2.2
export PATH=$M2_HOME/bin:$PATH
# Clean and Create Directories
export JULIA_PKGDIR="/var/lib/juliapkg/"
rm -rf ${JULIA_PKGDIR}
mkdir ${JULIA_PKGDIR}
mkdir "${JULIA_PKGDIR}v0.5"
declare -a users=("jlssh01" "spark") #TODO: change accordingly
for usr in "${users[@]}"; do
# Set Package folder permissions
setfacl -R -m u:${usr}:rwx ${JULIA_PKGDIR}
done
# Set Environment variables for current session
export PATH=${PATH}:${M2_HOME}/bin:${JULIA_HOME}/bin
export HOME="/root"
echo "Installing Julia Packages in Julia Folder ${JULIA_PKGDIR}"
$JULIA_HOME/bin/julia -e 'Pkg.init();Pkg.clone("https://github.com/aviks/Spark.jl");Pkg.checkout("Spark", "as/fixinit"); Pkg.build("Spark")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment