@simplehomelab/deployrr 6.0.7 → 6.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- # Handle npx symlinks correctly
5
- TARGET_FILE="$(realpath "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || echo "${BASH_SOURCE[0]}")"
6
- SCRIPT_DIR="$(cd "$(dirname "$TARGET_FILE")/.." && pwd)"
7
-
8
- # If npx copies the script or we are in a flattened node_modules structure, SCRIPT_DIR might just be node_modules
9
- if [[ ! -d "$SCRIPT_DIR/apps" ]] && [[ -d "$SCRIPT_DIR/@simplehomelab/deployrr/apps" ]]; then
10
- SCRIPT_DIR="$SCRIPT_DIR/@simplehomelab/deployrr"
11
- fi
4
+ # Handle npx symlinks cleanly and bulletproof
5
+ SOURCE="${BASH_SOURCE[0]}"
6
+ while [ -h "$SOURCE" ]; do
7
+ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
8
+ SOURCE="$(readlink "$SOURCE")"
9
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
10
+ done
11
+ SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )/.."
12
12
 
13
13
  DEPLOYRR_DIR="/opt/deployrr"
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplehomelab/deployrr",
3
- "version": "6.0.7",
3
+ "version": "6.0.8",
4
4
  "description": "Deployrr - Docker homelab deployment manager",
5
5
  "bin": {
6
6
  "deployrr": "./bin/deployrr-init.sh"