From: Iain Patterson Date: Thu, 28 Jun 2007 08:42:43 +0000 (+0000) Subject: Added subversion config. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=3638b2ac8e2e40888dae60233cc85f46de037acd;p=profile.git Added subversion config. Added proxy.bashrc to get proxy information from .subversion/servers. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@57 6be0d1a5-5cfe-0310-89b6-964be062b18b --- diff --git a/.profile.d/proxy.bashrc b/.profile.d/proxy.bashrc new file mode 100644 index 0000000..811fcbd --- /dev/null +++ b/.profile.d/proxy.bashrc @@ -0,0 +1,13 @@ +# $Id$ +# Read proxy information from Subversion if possible. + +servers=~/.subversion/servers + +if [ -r "$servers" ]; then + eval $(sed -n '/^\[global\]/,/^\[/s/^http-proxy-\([^= ]*\) *= *\(.*\)/proxy_\1="\2"/p' "$servers") + creds="" + [ ! -z "$proxy_username" ] && creds="$proxy_username:$proxy_password@" + export http_proxy="http://$creds$proxy_host:${proxy_port:-80}" +fi + +unset proxy_username proxy_password proxy_host proxy_port creds servers diff --git a/.subversion/config b/.subversion/config new file mode 100644 index 0000000..7e25f99 --- /dev/null +++ b/.subversion/config @@ -0,0 +1,4 @@ +# $Id$ + +[helpers] +editor-cmd = vim