From 93ba996def65bdebd7d7026caff9661d9b038ead Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 22 Dec 2008 22:14:41 +0000 Subject: [PATCH] bash_profile: Be more intelligent about proxy settings. It might be that we just don't want a proxy. Allow a `none' setting for these cases. Set the ftp-proxy correctly too. --- bash_profile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bash_profile b/bash_profile index 7283d15..f2b0d38 100644 --- a/bash_profile +++ b/bash_profile @@ -156,8 +156,18 @@ export TMP=$TMPDIR export PERL_READLINE_NOWARN=yes [ -z "$NNTPSERVER" ] && export NNTPSERVER=`mdw-conf nntp-server` -[ -z "$http_proxy" ] && export http_proxy=http://`mdw-conf http-proxy`/ -[ -z "$ftp_proxy" ] && export ftp_proxy=$http_proxy + +http=`mdw-conf http-proxy none` +case "${http_proxy-none},$http" in + *,none) ;; + none,*) export http_proxy=$http ;; +esac +ftp=`mdw-conf ftp-proxy none` +case "${ftp_proxy-none},$ftp,${http_proxy-none}" in + *,none,none) ;; + none,none,*) export ftp_proxy=$http_proxy ;; + none,*,*) export ftp_proxy=$ftp ;; +esac export XUSERFILESEARCHPATH="$HOME/.Xapps/%N:/usr/lib/X11/%T/%N%S" -- 2.11.0