-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathclient.sh
More file actions
executable file
·33 lines (25 loc) · 1.2 KB
/
Copy pathclient.sh
File metadata and controls
executable file
·33 lines (25 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
set -eu
PROJECT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
. "${PROJECT_DIR}/client-version.txt"
: "${CLIENT_VERSION:?CLIENT_VERSION is required}"
: "${CLIENT_NAME:?CLIENT_NAME is required}"
RELEASE_URL=${CLIENT_RELEASE_URL:-https://github.com/jumpserver/luna/releases/download/v${CLIENT_VERSION}}
DOWNLOAD_DIR=${CLIENT_DOWNLOAD_DIR:-/opt/download/public}
WEBLITE_DOWNLOAD_DIR=${WEBLITE_DOWNLOAD_DIR:-/opt/download/applets}
mkdir -p "${DOWNLOAD_DIR}" "${WEBLITE_DOWNLOAD_DIR}"
cd "${DOWNLOAD_DIR}"
windows_file="${CLIENT_NAME}Client_${CLIENT_VERSION}_x64-setup.exe"
macos_arm64_file="${CLIENT_NAME}Client_${CLIENT_VERSION}_aarch64.dmg"
weblite_file="JumpServer-WebLite-${CLIENT_VERSION}-x64.msi"
wget --https-only \
--output-document="${windows_file}" \
"${RELEASE_URL}/${CLIENT_NAME}-${CLIENT_VERSION}-Setup.exe"
wget --https-only \
--output-document="${macos_arm64_file}" \
"${RELEASE_URL}/${CLIENT_NAME}-${CLIENT_VERSION}-arm64.dmg"
wget --https-only \
--output-document="${WEBLITE_DOWNLOAD_DIR}/${weblite_file}" \
"${RELEASE_URL}/${weblite_file}"
ln -s "${windows_file}" "Client_${CLIENT_VERSION}_x64-setup.exe"
ln -s "${macos_arm64_file}" "Client_${CLIENT_VERSION}_aarch64.dmg"