From eaac4916b4ac9d16d5bae80e256f946cb340b932 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 2 Jul 2007 07:14:13 +0000 Subject: [PATCH] Fixed proxy check when there is no proxy. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@60 6be0d1a5-5cfe-0310-89b6-964be062b18b --- .profile.d/proxy.bashrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.profile.d/proxy.bashrc b/.profile.d/proxy.bashrc index 811fcbd..a0096d1 100644 --- a/.profile.d/proxy.bashrc +++ b/.profile.d/proxy.bashrc @@ -6,8 +6,10 @@ 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}" + if [ ! -z "$proxy_host" ]; then + [ ! -z "$proxy_username" ] && creds="$proxy_username:$proxy_password@" + export http_proxy="http://$creds$proxy_host:${proxy_port:-80}" + fi fi unset proxy_username proxy_password proxy_host proxy_port creds servers -- 2.20.1