Created
July 28, 2016 16:24
-
-
Save iandunn/0d33e0abc769dd3a8c4814a80a686dd9 to your computer and use it in GitHub Desktop.
Avoid having to enter a password when you just want to `svn up`
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
# Avoid having to enter a password when you just want to `svn up` | |
function svn() { | |
local args=($@) | |
local rest=(${args[@]:1:${#args[@]}}) | |
local SVN="/usr/bin/svn" | |
case $1 in | |
up) | |
source /root/config/environment-variables | |
/bin/bash -c "$SVN --no-auth-cache --username $SVNUSER --password $SVNPASS up $rest" | |
;; | |
*) | |
/bin/bash -c "$SVN $@" | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment