From 3638b2ac8e2e40888dae60233cc85f46de037acd Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Thu, 28 Jun 2007 08:42:43 +0000 Subject: [PATCH] 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 --- .profile.d/proxy.bashrc | 13 +++++++++++++ .subversion/config | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 .profile.d/proxy.bashrc create mode 100644 .subversion/config 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 -- 2.7.4