removed use of dirname

This commit is contained in:
Martin Berghaus
2025-04-08 22:29:39 +02:00
parent 03efc9a187
commit 9230cc1b73
7 changed files with 12 additions and 12 deletions

View File

@@ -1,8 +1,7 @@
#!/bin/bash
_SCRIPT="$(readlink -f "${0}" 2> /dev/null)"
_SCRIPT_FOLDER="$(dirname ${_SCRIPT:?"Missing SCRIPT"} 2> /dev/null)/"
_CIS_ROOT="$(dirname ${_SCRIPT_FOLDER:?"Missing SCRIPT_FOLDER"} 2> /dev/null)/"
_CIS_ROOT="${_SCRIPT%%/core/*}/" #Removes longest matching pattern '/core/*' from the end
[ -d "${_CIS_ROOT}" ] \
&& [ -d "${_CIS_ROOT}definitions/" ] \