fix: install.sh syntax errors from sed replacements

- Fixed stray dots and missing quotes in download URLs
- Fixed stale receiptnext binary references (now app)
- Fixed missing closing quote on info message
This commit is contained in:
Claus Lohmar 2026-05-30 15:55:28 +00:00
parent e20a484ebc
commit e977907da3

View file

@ -76,8 +76,8 @@ if [ "${1:-}" = "-update" ]; then
TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \ TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \
| python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','v1.0.0'))" 2>/dev/null || echo "v1.0.0") | python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','v1.0.0'))" 2>/dev/null || echo "v1.0.0")
ARCH="$(uname -m)"; [ "$ARCH" = "x86_64" ] && ARCH="amd64"; [ "$ARCH" = "aarch64" ] && ARCH="arm64" ARCH="$(uname -m)"; [ "$ARCH" = "x86_64" ] && ARCH="amd64"; [ "$ARCH" = "aarch64" ] && ARCH="arm64"
sudo_if curl -fsSL -o app .https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/app-linux-${ARCH}" sudo_if curl -fsSL -o app "https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/app-linux-${ARCH}"
sudo_if chmod +x receiptnext sudo_if chmod +x app
fi fi
info "Restarting service..." info "Restarting service..."
@ -128,10 +128,10 @@ else
TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \ TAG=$(curl -fsSL https://git.lohmar.co.uk/api/v1/repos/cclohmar/ReceiptNext/releases/latest \
| python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','v1.0.0'))" 2>/dev/null || echo "v1.0.0") | python3 -c "import json,sys; print(json.load(sys.stdin).get('tag_name','v1.0.0'))" 2>/dev/null || echo "v1.0.0")
URL="https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/app-linux-${ARCH}" URL="https://git.lohmar.co.uk/cclohmar/ReceiptNext/releases/download/${TAG}/app-linux-${ARCH}"
sudo_if curl -fsSL -o app .$URL" sudo_if curl -fsSL -o app "$URL"
sudo_if chmod +x receiptnext sudo_if chmod +x app
fi fi
info "Binary ready: $INSTALL_DIR/app info "Binary ready: $INSTALL_DIR/app"
# ── 3. Create runtime directories ──────────────────────────────── # ── 3. Create runtime directories ────────────────────────────────
sudo_if mkdir -p storage sudo_if mkdir -p storage
@ -349,7 +349,7 @@ echo " ║ Installation Complete! ║"
echo " ╚═══════════════════════════════════════╝" echo " ╚═══════════════════════════════════════╝"
echo "" echo ""
echo " Install: $INSTALL_DIR" echo " Install: $INSTALL_DIR"
echo " Binary: $INSTALL_DIR/receiptnext" echo " Binary: $INSTALL_DIR/app"
echo " Config: $INSTALL_DIR/.env" echo " Config: $INSTALL_DIR/.env"
echo " Templates: $INSTALL_DIR/templates/" echo " Templates: $INSTALL_DIR/templates/"
echo " Static: $INSTALL_DIR/static/" echo " Static: $INSTALL_DIR/static/"