fix: install in current directory

This commit is contained in:
2026-08-30 12:53:22 +00:00
parent 252a3320df
commit ef605f8a2d
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -4,7 +4,7 @@ set -euo pipefail
CATALOG_URL=${XYMEDIA_CATALOG_URL:-https://git.keeper.work/admin/xymediavault-releases/raw/branch/main/catalog-v1.json}
RELEASE_BASE=${XYMEDIA_RELEASE_BASE:-https://git.keeper.work/admin/xymediavault-releases/raw/branch/main}
SCRIPT_DIR=$(cd -- "$(dirname -- "$0")" && pwd -P)
INSTALL_DIR=/opt/xymediavault
INSTALL_DIR=${XYMEDIA_INSTALL_DIR:-$PWD}
PG_HOST=postgres
PG_PORT=5432
PG_DB=xymedia
@@ -95,7 +95,11 @@ print(entry["version"] + "\t" + entry["asset_url"])
PY
}
download_extract() {
local component=$1 version=$2 url=$3 target=$4 archive="$INSTALL_DIR/state/$component-$version.archive"
local component=$1
local version=$2
local url=$3
local target=$4
local archive="$INSTALL_DIR/state/$component-$version.archive"
curl --fail --silent --show-error --location --proto '=https' --tlsv1.2 "$url" -o "$archive"
local tarball="$archive.tar"
if [[ $url == *.tar.gz || $url == *.tgz ]]; then gzip -dc "$archive" >"$tarball"; else zstd -dc "$archive" >"$tarball"; fi