-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
29 lines (24 loc) · 745 Bytes
/
install.sh
File metadata and controls
29 lines (24 loc) · 745 Bytes
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
#!/bin/bash
# Architecture
arch=$(uname -m)
# OS/Kernel
kern=$(uname -s)
# Determine installation binary
if [[ "$arch" == "x86_64" && "$kern" == "Linux" ]]; then
binary=x86_64-unknown-linux-gnu
elif [[ "$arch" == "x86_64" && "$kern" == "Darwin" ]]; then
binary=x86_64-apple-darwin
elif [[ "$arch" == "arm64" && "$kern" == "Darwin" ]]; then
binary=aarch64-apple-darwin
elif [[ "$arch" == "x86_64" && "$kern" == "MINGW64"* ]]; then
binary=program-x86_64-windows
else
echo "Unsupported architecture/OS"
exit 1
fi
# Download and install
curl -sL https://raw.githubusercontent.com/srhyne/doinfo/main/builds/$binary/doinfo -o doinfo
chmod +x doinfo
mv doinfo /usr/local/bin
mkdir ~/.doinfo
echo "Installation complete!"