Skip to content

Commit 939e50f

Browse files
KyleTryonKyleTryon
authored andcommitted
fix: install script
1 parent ee7d43d commit 939e50f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

install.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
VERSION=$(curl -s https://api.github.com/repos/TechSquidTV/uhs-cli/releases/latest | grep tag_name | cut -d '"' -f 4)
55

66
# The operating system and architecture
7-
OS=$(uname | tr '[:upper:]' '[:lower:]')
7+
OS=$(uname)
88
ARCH=$(uname -m)
99

1010
# Check if the architecture is x86
@@ -13,18 +13,22 @@ if [ "$ARCH" = "x86_64" ]; then
1313
fi
1414

1515
# 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"
1717

1818
# Download and extract the binary
1919
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
2125

2226
# 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
2428

2529
# 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}
2832

2933
echo "Installed uhs-cli version ${VERSION}"
3034
echo "Run 'uhs --help' to get started"

0 commit comments

Comments
 (0)