Skip to content

Commit

Permalink
Allow symlinking to frontendlauncher from other dirs (#19346)
Browse files Browse the repository at this point in the history
  • Loading branch information
iljah committed Mar 27, 2024
1 parent 60b966f commit e1903fd
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/bin/frontendlauncher
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
#
###############################################################################

#
# Function to resolve through potential symlinks to actual dir where script lives
#
script_dirname() {
lnk=$(readlink -f "$1")
scrdir=$(dirname $lnk)
echo $scrdir
}

# Determine VisIt architecture
osname=$(uname)
if test "$osname" = "Linux"; then
Expand Down Expand Up @@ -90,7 +99,7 @@ done

# Find the most recent VisIt python
visitpython=""
dir="$(dirname $0)"
dir="$(script_dirname $0)"
for ver in $versions; do
thispython="$dir/../$ver/$platform/bin/python"
thispython3="$dir/../$ver/$platform/bin/python3"
Expand Down Expand Up @@ -176,10 +185,10 @@ if test "$version" != ""; then
fi

# Execute VisIt's Python or system Python, depending on what's available
frontendlauncherpy="$(dirname $0)/frontendlauncher.py"
frontendlauncherpy="$(script_dirname $0)/frontendlauncher.py"
unset PYTHONHOME
if test -n "$visitpython"; then
visitdir="$(dirname $(dirname $visitpython))"
visitdir="$(dirname $(script_dirname $visitpython))"

# Which Python was VisIt built against? Look for python<ver> executable
# next to the python binary we located already.
Expand Down

0 comments on commit e1903fd

Please sign in to comment.