Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

theme.sh: resolve the theme folder with pwd -W so Windows Python can open it

MoonZhea1f7744ce990
diff --git a/tools/theme.sh b/tools/theme.sh
index 26f56fab9..2fbd14373 100755
--- a/tools/theme.sh
+++ b/tools/theme.sh
@@ -7,8 +7,9 @@
# TV_HOST=192.168.1.50 tools/theme.sh --reset # remove the overlay, back to config.xml
set -euo pipefail
# Resolve the theme folder against the caller's directory before moving into tools/.
+# Git Bash's pwd says /c/Users/..., which the Windows Python cannot open; pwd -W gives C:/Users/... (as in disable.sh).
THEME_ARG="${1:-}"
-case "$THEME_ARG" in --reset|"") ;; /*) ;; *) THEME_ARG="$PWD/$THEME_ARG" ;; esac
+case "$THEME_ARG" in --reset|"") ;; /*) ;; *) THEME_ARG="$(pwd -W 2>/dev/null || pwd)/$THEME_ARG" ;; esac
cd "$(dirname "$0")"
: "${TV_HOST:?set TV_HOST to the TV IP address, e.g. TV_HOST=192.168.1.50 $0 themes/aurora}"
PY=venv/bin/python