Skip to content

Commit 9a7d09b

Browse files
Update install/nebula-sync-install.sh
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 921584f commit 9a7d09b

1 file changed

Lines changed: 3 additions & 24 deletions

File tree

install/nebula-sync-install.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,9 @@ INSTALL_PATH="/opt/nebula-sync"
1717
ENV_PATH="/opt/nebula-sync/.env"
1818
SERVICE_PATH="/etc/systemd/system/nebula-sync.service"
1919

20-
msg_info "Downloading Nebula-Sync"
21-
mkdir -p "$INSTALL_PATH"
22-
cd "$INSTALL_PATH"
23-
24-
# Get latest release
25-
LATEST_RELEASE=$(curl -fsSL https://api.github.com/repos/lovelaze/nebula-sync/releases/latest | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')
26-
ARCH=$(uname -m)
27-
case "$ARCH" in
28-
x86_64) ARCH="amd64" ;;
29-
aarch64) ARCH="arm64" ;;
30-
armv7l) ARCH="armv7" ;;
31-
*) msg_error "Unsupported architecture: $ARCH"; exit 1 ;;
32-
esac
33-
34-
# Download binary
35-
VERSION_NO_V="${LATEST_RELEASE#v}"
36-
BINARY_URL="https://github.com/lovelaze/nebula-sync/releases/download/${LATEST_RELEASE}/nebula-sync_${VERSION_NO_V}_linux_${ARCH}.tar.gz"
37-
curl -fSL -o nebula-sync.tar.gz "$BINARY_URL" || {
38-
msg_error "Failed to download Nebula-Sync binary from ${BINARY_URL}"
39-
exit 1
40-
}
41-
tar -xzf nebula-sync.tar.gz
42-
rm nebula-sync.tar.gz
43-
chmod +x nebula-sync
20+
msg_info "Installing Nebula-Sync"
21+
fetch_and_deploy_gh_release "nebula-sync" "lovelaze/nebula-sync" "prebuild" "latest" "/opt/nebula-sync" "nebula-sync_.*_linux_.*\.tar\.gz"
22+
msg_ok "Installed Nebula-Sync"
4423
msg_ok "Downloaded Nebula-Sync ${LATEST_RELEASE}"
4524

4625
# Gather configuration from user

0 commit comments

Comments
 (0)