-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·50 lines (41 loc) · 883 Bytes
/
install.sh
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
43
44
45
46
47
48
49
50
#!/bin/bash
# Detect the platform and architecture
OS=$(uname -s)
ARCH=$(uname -m)
VERSION=v0.6.0
# Map platform and architecture to the correct binary name
case "$OS" in
Linux)
PLATFORM="linux"
;;
Darwin)
PLATFORM="darwin"
;;
*)
echo "Unsupported OS: $OS"
exit 1
;;
esac
case "$ARCH" in
x86_64)
ARCH="amd64"
;;
arm64)
ARCH="arm64"
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac
# Define the download URL based on platform and architecture
URL="https://github.com/EyalPazz/promoter/releases/download/${VERSION}/promoter_${PLATFORM}_${ARCH}"
# Define the install path
INSTALL_PATH="/usr/local/bin/promoter"
# Download the binary
curl -L $URL -o promoter
# Make it executable
chmod +x promoter
# Move it to the install path
sudo mv promoter $INSTALL_PATH
echo "promoter installed successfully!"