mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-25 08:56:21 +00:00
Eliminate syntax check for installed launcher
Removed defensive checks for launcher script syntax during installation.
This commit is contained in:
@@ -821,13 +821,6 @@ install_normal_version() {
|
|||||||
cp "./version.txt" "$LOCAL_VERSION_FILE"
|
cp "./version.txt" "$LOCAL_VERSION_FILE"
|
||||||
cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh"
|
cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh"
|
||||||
|
|
||||||
# Defensive: strip CRLF and reject a broken launcher before we declare success.
|
|
||||||
sed -i 's/\r$//' "$INSTALL_DIR/$MENU_SCRIPT" "$UTILS_FILE" 2>/dev/null || true
|
|
||||||
if ! bash -n "$INSTALL_DIR/$MENU_SCRIPT" 2>/dev/null; then
|
|
||||||
msg_error "Installed launcher failed syntax check. Installation aborted."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Wipe the scripts tree before copying so any file removed upstream
|
# Wipe the scripts tree before copying so any file removed upstream
|
||||||
# (renamed, consolidated, deprecated) disappears from the user install.
|
# (renamed, consolidated, deprecated) disappears from the user install.
|
||||||
# Only $BASE_DIR/scripts/ is cleared; config.json, cache.json,
|
# Only $BASE_DIR/scripts/ is cleared; config.json, cache.json,
|
||||||
@@ -971,12 +964,6 @@ install_translation_version() {
|
|||||||
cp "./version.txt" "$LOCAL_VERSION_FILE"
|
cp "./version.txt" "$LOCAL_VERSION_FILE"
|
||||||
cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh"
|
cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh"
|
||||||
|
|
||||||
sed -i 's/\r$//' "$INSTALL_DIR/$MENU_SCRIPT" "$UTILS_FILE" 2>/dev/null || true
|
|
||||||
if ! bash -n "$INSTALL_DIR/$MENU_SCRIPT" 2>/dev/null; then
|
|
||||||
msg_error "Installed launcher failed syntax check. Installation aborted."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$BASE_DIR/scripts"
|
mkdir -p "$BASE_DIR/scripts"
|
||||||
cp -r "./scripts/"* "$BASE_DIR/scripts/"
|
cp -r "./scripts/"* "$BASE_DIR/scripts/"
|
||||||
chmod -R +x "$BASE_DIR/scripts/"
|
chmod -R +x "$BASE_DIR/scripts/"
|
||||||
|
|||||||
Reference in New Issue
Block a user