Skip to content

Commit a49941c

Browse files
committed
auto-install jq + fix duplicated INSTALL_START_EPOCH
1 parent d937c56 commit a49941c

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

dream-server/installers/lib/constants.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Expects: (nothing — first file sourced)
99
# Provides: VERSION, SCRIPT_DIR, INSTALL_DIR, LOG_FILE, color codes,
1010
# SYSTEM_TZ, CAPABILITY_PROFILE_FILE, PREFLIGHT_REPORT_FILE,
11-
# INSTALL_START_EPOCH, _sed_i(),
12-
# INSTALL_START_EPOCH
11+
# INSTALL_START_EPOCH, _sed_i()
1312
#
1413
# Modder notes:
1514
# Change VERSION for custom builds. Add new color codes here.

dream-server/installers/phases/01-preflight.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ fi
4343
log "curl: $(curl --version 2>/dev/null | sed -n '1p')"
4444

4545
if ! command -v jq &> /dev/null; then
46+
log "jq not found — attempting auto-install..."
4647
case "$PKG_MANAGER" in
47-
dnf) error "jq is required but not installed. Install with: sudo dnf install jq" ;;
48-
pacman) error "jq is required but not installed. Install with: sudo pacman -S jq" ;;
49-
zypper) error "jq is required but not installed. Install with: sudo zypper install jq" ;;
50-
*) error "jq is required but not installed. Install with: sudo apt install jq" ;;
48+
dnf) sudo dnf install -y jq ;;
49+
pacman) sudo pacman -S --noconfirm jq ;;
50+
zypper) sudo zypper install -y jq ;;
51+
apk) sudo apk add jq ;;
52+
*) sudo apt-get install -y jq ;;
5153
esac
54+
command -v jq &> /dev/null || error "Failed to install jq automatically. Install it manually and re-run."
5255
fi
5356
log "jq: $(jq --version 2>/dev/null)"
5457

0 commit comments

Comments
 (0)