diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-10 15:03:03 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-10 15:03:03 +0100 |
| commit | bb4c03879448d41fa3f34c13a8b78a4e9913b93a (patch) | |
| tree | 9d069d842905195e7abeabbd46807f96a6266b93 | |
| parent | 786cf8cd9cd177cefb93609675b66a125fc42db9 (diff) | |
cleanup
actually use xbarg0
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rwxr-xr-x | mk | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -10,18 +10,14 @@ set -u -e xrval=0 ( -xbdir="" xbarg0="$0" - -if [ "${0##*/}" = "$0" ]; then - xbarg0="`command -v "$0"`" - xbdir="${xbarg0%/*}" - xbcddir="$xbdir" +if [ "${xbarg0##*/}" = "$xbarg0" ]; then + xbarg0="`command -v "$xbarg0"`" fi -xbcddir="`readlink -f "$0" 2>/dev/null`" +xbcddir="`readlink -f "$xbarg0" 2>/dev/null`" if [ -z "$xbcddir" ]; then - xbcddir="`realpath "$0" 2>/dev/null`" + xbcddir="`realpath "$xbarg0" 2>/dev/null`" fi cd "${xbcddir%/*}" || exit 1 |
