Skip to content

Commit aa76a35

Browse files
committed
Remove Old binaries
1 parent 538af44 commit aa76a35

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

server_linux_install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,14 @@ if ! curl -fL --retry 3 --retry-delay 2 --connect-timeout 15 -o "$ZIP_PATH" "$UR
665665
fi
666666

667667
[[ -s "$ZIP_PATH" ]] || log_error "Downloaded archive is missing or empty: $ZIP_PATH"
668+
669+
# Remove old binaries with the same prefix so executable selection is deterministic.
670+
shopt -s nullglob
671+
for old_bin in ${PREFIX}_v*; do
672+
rm -f -- "$old_bin"
673+
done
674+
shopt -u nullglob
675+
668676
unzip -q -o "$ZIP_PATH" -d "$INSTALL_DIR" || log_error "Failed to extract archive."
669677
log_success "Files extracted."
670678

0 commit comments

Comments
 (0)