init
This commit is contained in:
commit
b4cdb80b5c
137 changed files with 6383 additions and 0 deletions
15
bin/.bin/code.sh
Executable file
15
bin/.bin/code.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
MODULE_URL="mzunino.com.uy/go/code"
|
||||
BINARY_NAME="code"
|
||||
|
||||
TARGET_DIR="$HOME/.bin"
|
||||
CODE_PATH="$TARGET_DIR/$BINARY_NAME"
|
||||
if [ ! -x "$CODE_PATH" ]; then
|
||||
notify-send "Installing $BINARY_NAME" "Installing from $MODULE_URL..."
|
||||
GO111MODULE=on GOBIN="$TARGET_DIR" go install "$MODULE_URL@latest" || {
|
||||
notify-send -u critical "Installation Failed" "Failed to install $BINARY_NAME from $MODULE_URL"
|
||||
exit 1
|
||||
}
|
||||
notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
|
||||
fi
|
||||
exec "$CODE_PATH" "$@"
|
Loading…
Add table
Add a link
Reference in a new issue