Skip to content

Commit 85c14f5

Browse files
committed
Update install.sh to download hooks and binaries from URLs
1 parent eb0f7bb commit 85c14f5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

install.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ set -e
33

44
HOOK_PATH=".git/hooks/commit-msg"
55
BIN_PATH=".git/hooks/commit-msg-go"
6-
SCRIPT_SRC="_git/hooks/commit-msg"
7-
BIN_SRC="release/commit-msg-go"
6+
HOOK_URL="https://raw.githubusercontent.com/inem/dotdotdot/main/_git/hooks/commit-msg"
7+
BIN_URL="https://github.com/inem/dotdotdot/releases/latest/download/commit-msg-go"
88

99
if [ ! -d .git/hooks ]; then
1010
echo "Error: .git/hooks directory not found. Please run this script from the root of your git repository."
1111
exit 1
1212
fi
1313

14-
echo "Installing shell wrapper hook..."
15-
cp "$SCRIPT_SRC" "$HOOK_PATH"
14+
echo "Downloading shell wrapper hook..."
15+
curl -fsSL "$HOOK_URL" -o "$HOOK_PATH"
1616
chmod +x "$HOOK_PATH"
1717
echo "Hook installed to $HOOK_PATH"
1818

19-
echo "Copying Go binary to .git/hooks..."
20-
cp "$BIN_SRC" "$BIN_PATH"
19+
echo "Downloading Go binary..."
20+
curl -fsSL "$BIN_URL" -o "$BIN_PATH"
2121
chmod +x "$BIN_PATH"
2222
echo "Binary installed to $BIN_PATH"
2323

0 commit comments

Comments
 (0)