Created
November 21, 2016 02:38
-
-
Save doingweb/c14b8a9fe6dc1c6ce8b9b23523c7d0c9 to your computer and use it in GitHub Desktop.
Git post-receive hook for remote configuration of OpenHAB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
etc_dir=/etc/openhab | |
config_dir=configurations | |
rm -rf $etc_dir/$config_dir | |
GIT_WORK_TREE=$etc_dir git checkout -f HEAD $config_dir | |
chgrp -R openhab $etc_dir/$config_dir | |
chmod -R g+w $etc_dir/$config_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment