Created
November 22, 2011 15:00
-
-
Save alister/1385857 to your computer and use it in GitHub Desktop.
svnExport.sh
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 | |
REV=1914 | |
REVDIR=$REV.20080214.1914 | |
REPOSITORY=svn+ssh://[email protected]/var/svn/SITEURL/trunk | |
IMAGES=$REVDIR/htdocs/i | |
STATIC1=$REVDIR/example.co.uk | |
svn export --revision $REV $REPOSITORY $REVDIR | |
mkdir -p $REVDIR/tmp/templates_c | |
chown -R www-data: $REVDIR | |
chmod -R 777 $REVDIR/tmp $REVDIR/htdocs/cache/ | |
chown -R nobody: $REVDIR/tmp $REVDIR/htdocs/cache/ $IMAGES $STATIC1 | |
dos2unix $REVDIR/bin/*sh $REVDIR/bin/*php | |
chmod 755 $REVDIR/bin/*sh $REVDIR/bin/*php | |
# chmod -x all the non-directories in images | |
find $IMAGES -type f -perm -a+x | xargs -r chmod --quiet -x | |
find $STATIC1 -type f -perm -a+x | xargs -r chmod --quiet -x | |
ls -l $IMAGES/* | grep -- "-x" | |
# make the latest version available at http://dev.example.com | |
rm dev && ln -s $REVDIR dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment