Remove git hooks

This commit is contained in:
flyingscorpio@arch-desktop 2020-09-08 11:27:52 +02:00
parent 1b7ded47b8
commit 9b1f5298dd
3 changed files with 0 additions and 34 deletions

View file

@ -31,9 +31,6 @@ Lists the things to install, which includes programs, symlinks, git clones, shel
* `dotfiles/`<br>
The actual dotfiles. They are symlinked to the location that the system expects to find them.
* `git_hooks/`<br>
See `symlink_git_hooks.sh`.
* `install.py`<br>
Installs everything using `configs.yml`. This is the file to actually run.
@ -46,9 +43,6 @@ You need to manually copy or symlink any hook to `/etc/pacman.d/hooks/` to activ
* `shellcheck_binary_fix.sh`<br>
When running this on Manjaro, pacman was unable to find the shellcheck package, so this script installs the pre-compiled binary instead. If your package manager finds shellcheck, this script won't run.
* `symlink_git_hooks.sh`<br>
Helper script to symlink any hook in `git_hooks/` to your local `.git/hooks/` folder. Only for personal use to keep my git hooks version controlled.
* `todo`<br>
Never seems to remain empty...

View file

@ -1,11 +0,0 @@
#!/bin/sh
remote="$1"
url="$2"
if [ "$remote" = 'gitlab' ] || [ "$url" = 'git@gitlab.com:flyingscorpio/SetupCockpit.git' ]; then
exit 0
fi
echo "Pushing to Gitlab..."
git push gitlab master
exit 0

View file

@ -1,17 +0,0 @@
#!/bin/sh
# Handy script to symlink version controlled hooks (from git_hooks/) to local hooks (.git/hooks/)
HOOK_DIR=$(git rev-parse --show-toplevel)/.git/hooks
for hook in "$(git rev-parse --show-toplevel)"/git_hooks/*; do
# If the hook already exists, is executable, and is not a symlink
if [ ! -h "$HOOK_DIR/$hook" ] && [ -x "$HOOK_DIR/$hook" ]; then
echo "$hook already exists, renaming to $hook.local"
mv "$HOOK_DIR/$hook" "$HOOK_DIR/$hook.local"
fi
# create the symlink, overwriting the file if it exists
# probably the only way this would happen is if using an old version of git,
# -- back when the sample hooks were not executable, instead of being named ____.sample
ln -s -f "$hook" "$HOOK_DIR/"
echo "created symlink $hook"
done
echo "done"