Skip to content

Instantly share code, notes, and snippets.

@dharma017
Created September 13, 2015 11:13
Show Gist options
  • Select an option

  • Save dharma017/4c7d21f0f909c019624b to your computer and use it in GitHub Desktop.

Select an option

Save dharma017/4c7d21f0f909c019624b to your computer and use it in GitHub Desktop.
Deploy project via SVN with bash script

Write a bash script in Unix server and save as foo.sh

#!/bin/bash
cd /var/svn/foo/branches/devbranch
svn update
svn export --force  /var/svn/foo/branches/devbranch /var/www/foo

Provide permission to .sh file.

chmod u+x /usr/local/bin/foo.sh
sed -i -e 's/\r$//' /usr/local/bin/foo.sh

Run script file to export svn repo to project folder.

foo.sh

That's all.

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