Skip to content

Instantly share code, notes, and snippets.

@bufordtaylor
Forked from ericboehs/bin_update_hook_init.sh
Created October 27, 2016 16:50
Show Gist options
  • Save bufordtaylor/b0ea0e85c810e03b193f0bf6b24c78cc to your computer and use it in GitHub Desktop.
Save bufordtaylor/b0ea0e85c810e03b193f0bf6b24c78cc to your computer and use it in GitHub Desktop.
#! /bin/bash
for file in post-checkout post-commit post-merge post-rewrite; do
curl -sO "https://gist.githubusercontent.com/ericboehs/00d3e27c993b5b951a79312f6b51dbf5/raw/$file"
chmod +x $file
mv $file .git/hooks/
done
#!/bin/bash
(
while ls .git/bin_setup_lock* 1> /dev/null 2>&1; do
sleep 2
done
bin/update > /dev/null 2>&1
) &
#!/bin/bash
(
while ls .git/bin_setup_lock* 1> /dev/null 2>&1; do
sleep 2
done
bin/update > /dev/null 2>&1
) &
#!/bin/bash
(
while ls .git/bin_setup_lock* 1> /dev/null 2>&1; do
sleep 2
done
bin/update > /dev/null 2>&1
) &
#!/bin/bash
case "$1" in
rebase) exec .git/hooks/post-merge ;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment