use realpath with dirname to get the scriptdir

This commit is contained in:
HikariKnight 2022-03-12 15:28:44 +01:00
parent cd7b7a989a
commit 4fc07b97f2
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
11 changed files with 12 additions and 11 deletions

View file

@ -74,7 +74,7 @@ to build your new initrd image (all of this will require sudo permissions!)"
function main () {
SCRIPTDIR=$(dirname "$(which $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
apply_CHANGES
}