mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
fix: custom version handling in install.sh script
This commit is contained in:
+4
-2
@@ -7,6 +7,8 @@ INSTALL_SYSTEMD_DIR=${INSTALL_SYSTEMD_DIR:-/etc/systemd/system}
|
||||
|
||||
UNCLOUD_GITHUB_URL="https://github.com/psviderski/uncloud"
|
||||
UNCLOUD_VERSION=${UNCLOUD_VERSION:-latest}
|
||||
# Remove the 'v' prefix from the version if it exists.
|
||||
UNCLOUD_VERSION=${UNCLOUD_VERSION#v}
|
||||
UNCLOUD_USER="uncloud"
|
||||
# Add the specified Linux user to group $UNCLOUD_USER to allow the user to run uncloud commands without sudo.
|
||||
UNCLOUD_GROUP_ADD_USER=${UNCLOUD_GROUP_ADD_USER:-}
|
||||
@@ -116,8 +118,8 @@ install_uncloud_binaries() {
|
||||
uncloudd_url="${UNCLOUD_GITHUB_URL}/releases/latest/download/uncloudd_linux_${file_arch}.tar.gz"
|
||||
uninstall_url="https://raw.githubusercontent.com/psviderski/uncloud/refs/heads/main/scripts/uninstall.sh"
|
||||
else
|
||||
uncloudd_url="${UNCLOUD_GITHUB_URL}/releases/download/${UNCLOUD_VERSION}/uncloudd_linux_${file_arch}.tar.gz"
|
||||
uninstall_url="https://raw.githubusercontent.com/psviderski/uncloud/refs/heads/${UNCLOUD_VERSION}/scripts/uninstall.sh"
|
||||
uncloudd_url="${UNCLOUD_GITHUB_URL}/releases/download/v${UNCLOUD_VERSION}/uncloudd_linux_${file_arch}.tar.gz"
|
||||
uninstall_url="https://raw.githubusercontent.com/psviderski/uncloud/refs/tags/v${UNCLOUD_VERSION}/scripts/uninstall.sh"
|
||||
fi
|
||||
local uncloudd_download_path="${tmp_dir}/uncloudd.tar.gz"
|
||||
local uninstall_download_path="${tmp_dir}/uninstall.sh"
|
||||
|
||||
Reference in New Issue
Block a user