Last active
September 24, 2018 12:05
-
-
Save remcotolsma/adbdc9429ea1e592135c6ecd63597660 to your computer and use it in GitHub Desktop.
Subversion status, AWK and Subversion delete.
This file contains hidden or 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
# GNU tools on Mac. | |
# https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
# GNU `cat` | |
brew install coreutils | |
# GNU `xargs`: | |
# https://superuser.com/questions/467176/replacement-for-xargs-d-in-osx | |
brew install findutils --with-default-names | |
# GNU `grep`: | |
# https://apple.stackexchange.com/questions/193288/how-to-install-and-use-gnu-grep-in-osx | |
brew install grep --with-default-names |
This file contains hidden or 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
# https://github.com/stephenharris/grunt-wp-deploy | |
# https://github.com/GaryJones/wordpress-plugin-svn-deploy | |
# https://github.com/sudar/wp-plugin-in-github | |
# https://stackoverflow.com/questions/16991428/bash-how-to-put-each-line-within-quotation | |
cd deploy/wp-svn | |
svn update | |
cd ../ | |
rsync --recursive --delete latest/ wp-svn/trunk/ | |
cd wp-svn/trunk | |
svn status | grep '^!' | cut -c 9- | xargs -d '\n' -i svn delete {}@ | |
# ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ | |
# | | | | | | | |
# | | | | | \\ https://stackoverflow.com/questions/757435/how-to-escape-characters-in-subversion-managed-file-names | |
# | | | | | \\ http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html | |
# | | | | | | |
# | | | | \\ Subversion delete. | |
# | | | | | |
# | | | \\ Xargs. | |
# | | | | |
# | | \\ Cut. | |
# | | \\ https://github.com/apache/subversion/blob/1.10.2/subversion/svn/status.c#L447-L460 | |
# | | | |
# | \\ Grep. | |
# | | |
# \\ Subversion status. | |
svn status | grep '^?' | cut -c 9- | xargs -d '\n' -i svn add {}@ | |
# ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ | |
# | | | | | | | |
# | | | | | \\ https://stackoverflow.com/questions/757435/how-to-escape-characters-in-subversion-managed-file-names | |
# | | | | | \\ http://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html | |
# | | | | | | |
# | | | | \\ Subversion add. | |
# | | | | | |
# | | | \\ Xargs. | |
# | | | | |
# | | \\ Cut. | |
# | | \\ https://github.com/apache/subversion/blob/1.10.2/subversion/svn/status.c#L447-L460 | |
# | | | |
# | \\ Grep. | |
# | | |
# \\ Subversion status. | |
svn commit -m 'Update' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment