Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@iandunn
Created July 28, 2016 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iandunn/0d33e0abc769dd3a8c4814a80a686dd9 to your computer and use it in GitHub Desktop.
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`
# 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