From 8ce4a1752d79ffd577a50fda7f25df92e1fc3a93 Mon Sep 17 00:00:00 2001 From: mollusk Date: Tue, 12 Jun 2018 17:53:30 -0700 Subject: [PATCH] add installer script --- install.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7e85096 --- /dev/null +++ b/install.sh @@ -0,0 +1,26 @@ +#!/bin/bash + + +which () + { + (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@ + } + export -f which + +which julia &> /dev/null + +if [ $? != 0 ];then + echo -e -n "\nJulia is not installed, proceed?(Y/n): " + read confirm + + if [ "${confirm}" = "n" ];then + exit 0; + fi +fi + +sudo cp -v src/jprog.jl /usr/local/bin/jprog +if [ ! -f /usr/local/bin/jprog ];then + echo -e "/nUnable to install, please check permissions...\n" +else + echo -e "Jprog is successfully installed!\n" +fi \ No newline at end of file