-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·29 lines (22 loc) · 810 Bytes
/
install.sh
File metadata and controls
executable file
·29 lines (22 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
# Get the absolute path of the directory containing this script.
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SCRIPTS_DIR="$SKILL_DIR/scripts"
BIN_DIR="$SKILL_DIR/bin"
BINARY_PATH="$BIN_DIR/discogs-cli"
echo "==> Starting installation for discogs-cli skill..."
# 1. Create the bin directory
echo "==> Creating binary directory at $BIN_DIR"
mkdir -p "$BIN_DIR"
# 2. Navigate to the source directory
echo "==> Changing directory to $SCRIPTS_DIR"
cd "$SCRIPTS_DIR"
# 3. Build the Go binary
echo "==> Building Go binary..."
go build -o "$BINARY_PATH" .
# 4. Make the binary executable
chmod +x "$BINARY_PATH"
echo "==> Build complete. The binary is located at $BINARY_PATH"
echo "==> Installation successful!"