Skip to content

Commit 7adff2a

Browse files
authored
Merge pull request #21 from JuliaParallel/initial
Fix usage of newly introduced JULIAUP_EXE
2 parents d5b365a + 49704a8 commit 7adff2a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

juhpc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ info_end "$INFO_MSG"
179179

180180
# Create a wrapper for juliaup that installs juliaup (and latest julia) on scratch if it is not already installed
181181

182-
INFO_MSG="Creating wrapper for juliaup"
183-
info_start "$INFO_MSG"
182+
info_start "Creating wrapper for juliaup"
184183

185184
export JULIAUP_WRAPPER_BINDIR="$JUHPC_SETUP_INSTALLDIR/juliaup_wrapper"
186185
export JULIAUP_WRAPPER="$JULIAUP_WRAPPER_BINDIR/juliaup"
@@ -198,32 +197,31 @@ info() {
198197
echo -e "$(ENV["JUHPC"]) \$message" >&2
199198
}
200199
201-
export JULIAUP_EXE="$(ENV["JULIAUP_BINDIR"])/juliaup"
200+
JULIAUP_EXE="$(ENV["JULIAUP_BINDIR"])/juliaup"
202201
203-
if [ ! -f "$JULIAUP_EXE" ]; then
202+
if [ ! -f "\$JULIAUP_EXE" ]; then
204203
print_logo
205204
info "This is the first call to juliaup; juliaup and the latest julia will now be installed. After that, you can use juliaup and julia normally. Installing in $(ENV["JULIAUP_INSTALLDIR"])..."
206205
sleep 3
207206
PATH_OLD="\$PATH"
208207
export PATH=\$(echo \$PATH | perl -pe "s|[^:]*juliaup(?:_wrapper)?[^:]*:?||g") # Remove all juliaup paths from PATH
209208
curl -fsSL https://install.julialang.org | sh -s -- --add-to-path=no --yes --path="$(ENV["JULIAUP_INSTALLDIR"])" --background-selfupdate 0 --startup-selfupdate 0 || { echo "Failed to install Juliaup (and Julia)." >&2; exit 1; }
210209
export PATH="\$PATH_OLD"
211-
if [ ! -f "$JULIAUP_EXE" ]; then error "juliaup installation failed."; fi
210+
if [ ! -f "\$JULIAUP_EXE" ]; then error "juliaup installation failed."; fi
212211
info "... done. Installation of juliaup and the latest julia in $(ENV["JULIAUP_INSTALLDIR"]) completed. You can use juliaup and julia normally."
213212
else
214-
"$JULIAUP_EXE" \$@
213+
"\$JULIAUP_EXE" \$@
215214
fi
216215
""")
217216
' > "$JULIAUP_WRAPPER"
218217
chmod +x "$JULIAUP_WRAPPER"
219218

220-
info_end "$INFO_MSG"
219+
info "... done."
221220

222221

223222
# Create an activation script that sets environment variables for juliaup, julia and HPC key packages
224223

225-
INFO_MSG="Creating activation script"
226-
info_start "$INFO_MSG"
224+
info_start "Creating activation script"
227225

228226
export JULIAUP_DEPOT="$JULIAUP_INSTALLDIR/depot"
229227
export JULIA_DEPOT="$JULIAUP_INSTALLDIR/depot"
@@ -259,7 +257,7 @@ $(haskey(ENV,"JUHPC_ADIOS2_HOME") && ENV["JUHPC_ADIOS2_HOME"] != "" ? """
259257
""" : "")
260258
""")' > "$ACTIVATE_SCRIPT"
261259

262-
info_end "$INFO_MSG"
260+
info "... done."
263261

264262

265263
# Optionally execute a site-specific post installation julia script (if passed a third argument)

0 commit comments

Comments
 (0)