Skip to content

Instantly share code, notes, and snippets.

@tvalladon
Created November 13, 2010 06:25
Show Gist options
  • Save tvalladon/675141 to your computer and use it in GitHub Desktop.
Save tvalladon/675141 to your computer and use it in GitHub Desktop.
Create auto publish post commit hook
root> cd /path/to/svn/repo/{project}/hooks
root> ls post-commit
# if file does not exist:
root> touch post-commit
root> vim post-commit
i
#!/bin/sh
/usr/bin/svn update /var/www/sites/{project} --username www-data --password ************
{esc}
:wq
root> chown www-data: post-commit
root> chmod +x post-commit
# if file exists:
root> vim post-commit
:9999999
o
/usr/bin/svn update /var/www/sites/{project} --username www-data --password ************
{esc}
:wq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment