Make sure $SCRIPTDIR always has a nice looking path to the main scripts path

This commit is contained in:
HikariKnight 2022-02-28 20:36:21 +01:00
parent d9ae709081
commit a4946979b3
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
6 changed files with 7 additions and 12 deletions

View file

@ -38,8 +38,7 @@ To return to the previous page just press ENTER.
}
function main () {
SCRIPTDIR=$(dirname `which $0` | perl -pe "s/\/\.\.\/lib//")
SCRIPTDIR="$SCRIPTDIR/.."
SCRIPTDIR=$(dirname `which $0` | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
get_USB_CTL_GROUP $1
}