-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate_cli.sh
More file actions
executable file
·42 lines (37 loc) · 1.22 KB
/
update_cli.sh
File metadata and controls
executable file
·42 lines (37 loc) · 1.22 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
34
35
36
37
38
39
40
41
42
#!/bin/bash
release=$1
filename_windows=ast-cli_${release}_windows_x64.zip
filename_linux=ast-cli_${release}_linux_x64.tar.gz
filename_linuxarm=ast-cli_${release}_linux_arm64.tar.gz
filename_darwin=ast-cli_${release}_darwin_x64.tar.gz
#Windows
echo "Updating windows binary"
wget https://github.com/checkmarx/ast-cli/releases/download/${release}/${filename_windows}
unzip ${filename_windows} -d tmp
mv ./tmp/cx.exe ./src/main/resources/cx.exe
rm -r tmp
rm ${filename_windows}
#linux
echo "Updating linux binary"
wget https://github.com/checkmarx/ast-cli/releases/download/${release}/${filename_linux}
mkdir ./tmp/
tar -xvzf ${filename_linux} -C ./tmp/
mv ./tmp/cx ./src/main/resources/cx-linux
rm -r tmp
rm ${filename_linux}
#linuxarm
echo "Updating linuxarm binary"
wget https://github.com/checkmarx/ast-cli/releases/download/${release}/${filename_linuxarm}
mkdir ./tmp/
tar -xvzf ${filename_linuxarm} -C ./tmp/
mv ./tmp/cx ./src/main/resources/cx-linux-arm
rm -r tmp
rm ${filename_linuxarm}
#darwin
echo "Updating mac binary"
wget https://github.com/checkmarx/ast-cli/releases/download/${release}/${filename_darwin}
mkdir ./tmp/
tar -xvzf ${filename_darwin} -C ./tmp/
mv ./tmp/cx ./src/main/resources/cx-mac
rm -r tmp
rm ${filename_darwin}