File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 4
4
VERSION=$( curl -s https://api.github.com/repos/TechSquidTV/uhs-cli/releases/latest | grep tag_name | cut -d ' "' -f 4)
5
5
6
6
# The operating system and architecture
7
- OS=$( uname | tr ' [:upper:] ' ' [:lower:] ' )
7
+ OS=$( uname)
8
8
ARCH=$( uname -m)
9
9
10
10
# Check if the architecture is x86
@@ -13,18 +13,22 @@ if [ "$ARCH" = "x86_64" ]; then
13
13
fi
14
14
15
15
# The URL of the release
16
- URL=" https://github.com/TechSquidTV/uhs-cli/releases/download/${VERSION} /uhs-cli_${VERSION} _ ${ OS} _${ARCH} .tar.gz"
16
+ URL=" https://github.com/TechSquidTV/uhs-cli/releases/download/${VERSION} /uhs-cli_${OS} _${ARCH} .tar.gz"
17
17
18
18
# Download and extract the binary
19
19
wget $URL
20
- tar -xvzf uhs-cli_${VERSION} _${OS} _${ARCH} .tar.gz
20
+ mkdir uhs-cli_${OS} _${ARCH}
21
+ tar -xvzf uhs-cli_${OS} _${ARCH} .tar.gz -C uhs-cli_${OS} _${ARCH}
22
+
23
+ # Make the binary executable
24
+ chmod +x uhs-cli_${OS} _${ARCH} /uhs-cli
21
25
22
26
# Move the binary to a location in your PATH
23
- sudo mv uhs-cli_${VERSION} _ ${ OS} _${ARCH} /uhs-cli /usr/ local/bin/uhs
27
+ mv uhs-cli_${OS} _${ARCH} /uhs-cli ~ /. local/bin/uhs
24
28
25
29
# Clean up the downloaded file and the extracted directory
26
- rm uhs-cli_${VERSION} _ ${ OS} _${ARCH} .tar.gz
27
- rm -rf uhs-cli_${VERSION} _ ${ OS} _${ARCH}
30
+ rm uhs-cli_${OS} _${ARCH} .tar.gz
31
+ rm -rf uhs-cli_${OS} _${ARCH}
28
32
29
33
echo " Installed uhs-cli version ${VERSION} "
30
34
echo " Run 'uhs --help' to get started"
You can’t perform that action at this time.
0 commit comments