more shellcheck

This commit is contained in:
zerf58 2025-06-18 09:54:29 -07:00
parent d7accc8c69
commit c467b52cfe
2 changed files with 6 additions and 6 deletions

View file

@ -1,19 +1,19 @@
#!/bin/bash
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export ROOT=ROOT
export ROOT="$ROOT"
button="$1"
debug(){
debug=$ROOT/debug
debug="$ROOT"/debug
# todo:
# this keeps the log file at 30 lines but breaks the pipe when doing "tail -F debug"
tail -n 30 $debug > debug.tmp && mv debug.tmp $debug
tail -n 30 "$debug" > debug.tmp && mv debug.tmp "$debug"
echo "$1"
echo "$1">>$debug
echo "$1">>"$debug"
}
active=$(bash $ROOT/get_active_window.sh)
active=$(bash "$ROOT"/get_active_window.sh)
debug ""
debug "$(date +%s)"
debug "active: $active"

View file

@ -7,7 +7,7 @@ rm /home/htpc/.kodi/userdata/keymaps/keyboard.xml
ln /home/htpc/scripts/PJ/xml/keyboard.xml /home/htpc/.kodi/userdata/keymaps/keyboard.xml
rm /home/htpc/.kodi/userdata/advancedsettings.xml
export "$(grep -v '^#' /home/htpc/scripts/PJ/secrets.env | xargs)"
export $(grep -v '^#' /home/htpc/scripts/PJ/secrets.env | xargs)
envsubst < /home/htpc/scripts/PJ/xml/advancedsettings.xml > /home/htpc/.kodi/userdata/advancedsettings.xml
# disable the power button on PJ, ignore if already commented