mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-05 13:47:46 +08:00
14 lines
214 B
Bash
14 lines
214 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [ ! -d .git ]; then
|
|
exit 0
|
|
fi
|
|
|
|
mkdir -p ".git/hooks"
|
|
|
|
if [ ! -L '.git/hooks/pre-push' ]; then
|
|
ln -sf '../../scripts/git-hook-pre-push.sh' '.git/hooks/pre-push'
|
|
fi
|