@@ -32,7 +32,7 @@ info() {
32
32
if [[ " $JUHPC_VERBOSE " -ge " $verbose_min " ]]; then
33
33
echo -e " $JUHPC $message " >&2
34
34
fi
35
- echo -e " $JUHPC $message " >> " $TMP_JULIAUP_LOG "
35
+ echo -e " $JUHPC $message " >> " $JUHPC_SETUP_INSTALLLOG "
36
36
}
37
37
38
38
cleanup () {
@@ -66,9 +66,9 @@ check_dir() {
66
66
julia_pref () {
67
67
local cmd=" $1 "
68
68
if [[ " $JUHPC_VERBOSE " -gt 1 ]]; then
69
- julia --project=" $JULIA_PREFDIR " -e " $cmd " 2>&1 | tee -a " $TMP_JULIAUP_LOG "
69
+ julia --project=" $JULIA_PREFDIR " -e " $cmd " 2>&1 | tee -a " $JUHPC_SETUP_INSTALLLOG "
70
70
else
71
- julia --project=" $JULIA_PREFDIR " -e " $cmd " >> " $TMP_JULIAUP_LOG " 2>&1
71
+ julia --project=" $JULIA_PREFDIR " -e " $cmd " >> " $JUHPC_SETUP_INSTALLLOG " 2>&1
72
72
fi
73
73
}
74
74
@@ -80,7 +80,9 @@ export JULIAUP_INSTALLDIR="$2"
80
80
export JUHPC_POST_INSTALL_JL=" $3 "
81
81
82
82
83
- # Check/set environment variable defining verbosity of output
83
+ # Check/set environment variables for logging and defining verbosity of output
84
+
85
+ export JUHPC_SETUP_INSTALLLOG=" $JUHPC_SETUP_INSTALLDIR /setup_install.log" # Need to be defined at the very beginning
84
86
85
87
if [[ -z " $JUHPC_VERBOSE " ]]; then
86
88
export JUHPC_VERBOSE=0
@@ -119,15 +121,14 @@ mkdir -p "$JUHPC_SETUP_INSTALLDIR" || { error "failed to create directory: $JUHP
119
121
info " Installing juliaup and julia temporarily in $TMP_JULIAUP_ROOTDIR ..."
120
122
121
123
export TMP_JULIAUP_BINDIR=" $TMP_JULIAUP_ROOTDIR /bin" # juliaup and julia binaries
122
- export TMP_JULIAUP_LOG=" $JUHPC_SETUP_INSTALLDIR /setup_install.log"
123
124
export JULIAUP_DEPOT_PATH=" $TMP_JULIAUP_ROOTDIR /depot"
124
125
export JULIA_DEPOT_PATH=" $TMP_JULIAUP_ROOTDIR /depot"
125
126
export JULIA_PROJECT=" $JULIA_DEPOT_PATH /environments/latest"
126
127
export PATH=$( echo $PATH | perl -pe " s|[^:]*julia(?:up)?[^:]*:?||g" ) # Remove all juliaup paths from PATH
127
128
export PATH=$TMP_JULIAUP_BINDIR :$PATH
128
129
129
130
check_dir " $TMP_JULIAUP_ROOTDIR "
130
- curl -fsSL https://install.julialang.org | sh -s -- --add-to-path=no --yes --path=" $TMP_JULIAUP_ROOTDIR " --background-selfupdate 0 --startup-selfupdate 0 > $TMP_JULIAUP_LOG || { error " failed to install Juliaup (and Julia) in $TMP_JULIAUP_ROOTDIR ." ; }
131
+ curl -fsSL https://install.julialang.org | sh -s -- --add-to-path=no --yes --path=" $TMP_JULIAUP_ROOTDIR " --background-selfupdate 0 --startup-selfupdate 0 > $JUHPC_SETUP_INSTALLLOG || { error " failed to install Juliaup (and Julia) in $TMP_JULIAUP_ROOTDIR ." ; }
131
132
132
133
if [ ! -f " $TMP_JULIAUP_BINDIR /juliaup" ]; then error " temporary juliaup installation failed." ; fi
133
134
0 commit comments