Skip to content

Symlink support for launch-linux.sh #1183

@croogrog

Description

@croogrog

For ease of access I tried to use a symlink to launch-linux.sh but I got a not installed error. After looking into the script I recognized that the portion which ensures the local path did not resolve to the actual path of the script but used the symlink's path instead.
I quickly came up with a fix. This is working for me on fedora 43 and I expect it would work for most linux users.

relevant portion of launch-linux.sh

#!/usr/bin/env bash

# Ensure correct local path.
# Changed to properly resolve symlinks

# Removed
#SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

# Added
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"

# No further changes
cd $SCRIPT_DIR
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions