forked from weavejester/cljfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·43 lines (34 loc) · 777 Bytes
/
install.sh
File metadata and controls
executable file
·43 lines (34 loc) · 777 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -euo pipefail
VERSION=0.13.1
case $(uname -s) in
Linux*)
PLATFORM=linux
;;
Darwin*)
PLATFORM=darwin
;;
esac
STATIC=
case $(uname -m) in
aarch64)
ARCH=aarch64
;;
arm64)
ARCH=aarch64
;;
*)
ARCH=amd64
if [[ "$PLATFORM" == "linux" ]]; then
STATIC="-static"
fi
;;
esac
BASE_URL="https://github.com/weavejester/cljfmt/releases/download"
URL="${BASE_URL}/${VERSION}/cljfmt-${VERSION}-${PLATFORM}-${ARCH}${STATIC}.tar.gz"
echo -n "Downloading cljfmt binaries... "
curl -o /tmp/cljfmt.tar.gz -sL "$URL"
echo "Done!"
sudo tar -xzf /tmp/cljfmt.tar.gz -C /usr/local/bin
echo "Extracted cljfmt into /usr/local/bin"
rm /tmp/cljfmt.tar.gz