Open valosekj opened 3 years ago
Okay, it was not related to Darwin and Linux but to zsh
and bash
, fixed in https://github.com/valosekj/fsleyes_preset/commit/e40673415f0ff415433fa9695a214fd2f8fdf29a
Hm, it looks that
script_path=$(dirname $(readlink "$0"))
works for both zsh
and bash
.
Switched to this syntax for all shells and OS in https://github.com/valosekj/fsleyes_preset/commit/b876c55d64b6a4c245ab7fcfe8d09942b63e0f8c
On Debian, following command does not work:
The command returns empty variable, the working command is:
Fixed back in https://github.com/valosekj/fsleyes_preset/commit/96607da3bde6d13b36e0558b50aeaae6044ea41f
Some notes:
${SHELL}
- returns default shell for the user, not the currently used shell${0}
used inside the script returns script name, not the shell nameOn macOS Ventura 13.0, /bin/zsh
, iTerm2, the following is working:
script_path=$(dirname $(realpath "$0"))
Replace following line https://github.com/valosekj/fsleyes_preset/blob/aeb213bae2052ea6278b5e3bccbb2e78e7180323/fsleyes_preset.sh#L18
by