File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- set -e
3
+ set -euo pipefail
4
4
5
5
MOD=" github.com/eat-pray-ai/yutu/cmd"
6
6
Version=" ${MOD} .Version=$( git describe --tags --always --dirty | cut -c2-) "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ REPO=" github.com/eat-pray-ai/yutu"
6
+
7
+ ARCH=" UNKNOWN"
8
+ case $( uname -m) in
9
+ x86_64 | amd64) ARCH=" amd64" ;;
10
+ aarch64 | arm64) ARCH=" arm64" ;;
11
+ esac
12
+
13
+ if [[ " ${ARCH} " == " UNKNOWN" ]]; then
14
+ echo " Unlisted architecture: $( uname -m) "
15
+ echo " Please create an issue at ${REPO} /issues"
16
+ exit 1
17
+ fi
18
+
19
+ OS=" UNKNOWN"
20
+ case $( uname -s) in
21
+ Linux) OS=" linux" ;;
22
+ Darwin) OS=" darwin" ;;
23
+ esac
24
+
25
+ if [[ " ${OS} " == " UNKNOWN" ]]; then
26
+ echo " Unlisted OS: $( uname -s) "
27
+ echo " Please create an issue at ${REPO} /issues"
28
+ exit 1
29
+ fi
30
+
31
+ FILE=" yutu-${OS} -${ARCH} "
32
+ curl -sSfL https://${REPO} /releases/latest/download/${FILE} -o ./yutu
33
+ chmod +x ./yutu
34
+ ./yutu version
35
+
36
+ echo " " "
37
+ yutu🐰 is downloaded to the current directory.
38
+ You may want to move it to a directory in your PATH, e.g.:
39
+ sudo mv ./yutu /usr/local/bin/yutu
40
+ " " "
You can’t perform that action at this time.
0 commit comments