forked from aziis98/mup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·59 lines (47 loc) · 1.26 KB
/
install
File metadata and controls
executable file
·59 lines (47 loc) · 1.26 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
os=""
arch=""
case "$(uname)" in
Linux)
os="linux"
case "$(uname -m)" in
x86_64)
arch="amd64"
;;
# aarch64)
# arch="arm64"
# ;;
# armv7l)
# arch="armv7"
# ;;
*)
echo "Error: For now, prebuilt binaries not available for this architecture"
exit 1
;;
esac
;;
*)
echo "Error: For now, prebuilt binaries not available for this operating system"
exit 1
;;
esac
TMP_FILE=$(mktemp /tmp/mup.XXXXXX)
echo "Downloading GitHub releases: https://github.com/aziis98/mup/releases/latest/download/mup-$os-$arch"
curl -sSL --progress-bar -o "$TMP_FILE" "https://github.com/aziis98/mup/releases/latest/download/mup-$os-$arch"
if [ $? -ne 0 ]; then
echo "Error: Failed to download mup."
exit 1
fi
echo "Download completed."
chmod +x "$TMP_FILE"
mkdir -p "$HOME/.local/bin"
echo "Moving mup to $HOME/.local/bin..."
mv "$TMP_FILE" "$HOME/.local/bin/mup"
if ! echo "$PATH" | grep -q "$HOME/.local/bin"; then
echo "Warning: $HOME/.local/bin is not in your PATH. You may need to add it."
echo "Add the following line to your shell configuration file:"
echo
echo ' export PATH="$HOME/.local/bin:$PATH"'
echo
fi
echo "Installation completed successfully."