Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Last active October 27, 2016 16:50
Show Gist options
  • Save ericboehs/00d3e27c993b5b951a79312f6b51dbf5 to your computer and use it in GitHub Desktop.
Save ericboehs/00d3e27c993b5b951a79312f6b51dbf5 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
@ericboehs
Copy link
Author

ericboehs commented May 26, 2016

To install, run:

curl -sL https://gist.github.com/ericboehs/00d3e27c993b5b951a79312f6b51dbf5/raw/bin_update_hook_init.sh | bash

from your project root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment