Last active
August 29, 2015 13:56
-
-
Save amacgregor/9253969 to your computer and use it in GitHub Desktop.
Easy SVN commits
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/bash | |
# Created by: syphoxy | |
SVN_COMMIT_FILES="$(mktemp /tmp/svn-commit-files.XXXXX)" | |
svn status \ | |
| awk '{ $1 = ""; print $0 }' \ | |
| sed -Ee 's/^[ ]+//; s/[ ]+$//' > "$SVN_COMMIT_FILES" \ | |
&& [ -f "$SVN_COMMIT_FILES" ] \ | |
&& [ "$(wc -l < "$SVN_COMMIT_FILES")" -ge 1 ] \ | |
&& vim "$SVN_COMMIT_FILES" \ | |
&& svn commit --targets "$SVN_COMMIT_FILES" | |
echo -n "Cleaning up files .. " | |
rm -f "$SVN_COMMIT_FILES" | |
echo "done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment