#!/bin/bash


rsync -rc --exclude-from=".distignore" "." ../../../../svn/classy-wp/trunk/ --delete --delete-excluded
rsync -rc ".wordpress-org/." ../../../../svn/classy-wp/assets/ --delete


pushd ../../../../svn/classy-wp


# Add files to the SVN control:
svn add . --force
svn status | grep '^\!' | sed 's/! *//' | xargs -I% svn rm %@


# Create your first version tag (ex. 1.0.0):
svn cp "trunk" "tags/1.0.0"

# Fix screenshots MIME types (to avoid downloading them when clicking):
svn propset svn:mime-type image/png assets/*.png || true
svn propset svn:mime-type image/jpeg assets/*.jpg || true


# Submit your SVN to WP:
#svn ci -m 'Adding first version of classy-wp'

popd

