X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=myfai-chboot;h=7d775ea66cd1e13663ed38df4098e6b49f518a9b;hb=HEAD;hp=743859abcf803d65c7495a4424de204ca94adf7f;hpb=839b3cf02ad7e8900b3d685d54449f11e7b60b60;p=automated-distro-installer diff --git a/myfai-chboot b/myfai-chboot index 743859a..aa3c088 100755 --- a/myfai-chboot +++ b/myfai-chboot @@ -19,42 +19,52 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*} +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file this_dir="${this_file%/*}" +cd "$this_dir" usage() { - cat </dev/null; then ./myfai-chboot-local "$@" else