mirror of
https://github.com/daveberrys/guh.git
synced 2026-11-29 00:26:46 +08:00
any errors goes one liners
This commit is contained in:
1 parent
9a80548ecc
commit
ad0dc7c89d
5 files changed
+31
-19
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "This will install the compiled local 'guh' binary to '~/.local/bin' directory."
|
||||
read -p "Do you want to continue? [y/n]: " choice
|
||||
|
||||
if [ "$choice" != "Y" ] && [ "$choice" != "y" ]; then
|
||||
echo "Installation cancelled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Installing..."
|
||||
echo
|
||||
|
||||
go mod tidy && echo "Tidied go.mod and go.sum files."
|
||||
go get ./ && echo "Installed all packages." || echo "Failed to install all packages."
|
||||
go build && echo "Built 'guh' binary." || echo "Failed to build 'guh' binary."
|
||||
echo
|
||||
|
||||
cp guh ~/.local/bin/guh && echo "Successfully placed 'guh' in '~/.local/bin' directory." || echo "Failed to place 'guh' in '~/.local/bin' directory."
|
||||
chmod +x ~/.local/bin/guh && echo "Successfully made 'guh' executable." || echo "Failed to make 'guh' executable."
|
||||
|
||||
guh >> /dev/null && echo "Successfully installed 'guh' binary." || echo "Failed to install 'guh' binary."
|
||||
echo "Installation complete."
|
||||
Reference in new issue
Block a user