Using base.module.sh, replaced basename and dirname

This commit is contained in:
m8in
2026-05-15 23:47:44 +02:00
parent 272ebbaf9d
commit 30279d1056
6 changed files with 84 additions and 11 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
#!/bin/bash
source /cis/base/base.module.sh
#WARNING: Used for core functionality in setup.sh
# DO NOT rename the script and test changes well!
_SCRIPT_FOLDER="$(dirname $(readlink -f "${0}" 2> /dev/null) 2> /dev/null)"
_ROOT="${_SCRIPT_FOLDER%%/script/*}/" #Removes longest matching pattern '/script/*' from the end
source "${_ROOT:?"Missing ROOT"}core/addNormalUser.sh" "${1:?"Missing first parameter USER"}" && exit 0 || exit 1
source "${CIS[COREROOT]:?"Missing global COREROOT"}addNormalUser.sh" "${1:?"Missing first parameter USER"}" && exit 0 || exit 1