Add local Kodi repo tooling and repository addon
This commit is contained in:
17
scripts/serve_local_kodi_repo.sh
Executable file
17
scripts/serve_local_kodi_repo.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
DIST_DIR="${ROOT_DIR}/dist"
|
||||
HOST="${HOST:-127.0.0.1}"
|
||||
PORT="${PORT:-8080}"
|
||||
|
||||
if [[ ! -f "${DIST_DIR}/repo/addons.xml" ]]; then
|
||||
echo "Missing ${DIST_DIR}/repo/addons.xml" >&2
|
||||
echo "Run ./scripts/build_local_kodi_repo.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Serving local Kodi repo from ${DIST_DIR}"
|
||||
echo "Repository URL: http://${HOST}:${PORT}/repo/addons.xml"
|
||||
(cd "${DIST_DIR}" && python3 -m http.server "${PORT}" --bind "${HOST}")
|
||||
Reference in New Issue
Block a user