more robust references to script directory

This commit is contained in:
2024-03-22 07:12:18 +01:00
parent 7de4aa3e8e
commit 71539fb906
2 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
#!/bin/bash
. /home/spezi/Scripts/utils/colors.sh
# https://stackoverflow.com/a/246128
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/colors.sh
logger () {
echo -e "${NC}$(date) - [$BASHPID] - [${0##*/}] - $@${NC}"