From 2ff8a2b2c662a661c9c593031ece126f83cca9ca Mon Sep 17 00:00:00 2001 From: Erik Alexandre Pucci <eap08@c3sl.ufpr.br> Date: Sun, 17 Apr 2011 20:24:42 -0300 Subject: [PATCH] common.sh: Rewrite of proxy information checks using test(1) Signed-off-by: Erik Alexandre Pucci <eap08@c3sl.ufpr.br> Signed-off-by: Danilo K. S. Yorinori <danilok@c3sl.ufpr.br> --- common.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/common.sh b/common.sh index 2a3ac18..699b9ca 100644 --- a/common.sh +++ b/common.sh @@ -36,18 +36,10 @@ function getProxyConf() puid=$(grep "^puid=" ${PROXYCONF} | cut -f2 -d=) ppasswd=$(grep "^ppasswd=" ${PROXYCONF} | cut -f2 -d=) - if test -n "${phost}"; then - phost="--phost=${phost}" - fi - if test -n "${pport}"; then - pport="--pport=${pport}" - fi - if test -n "${puid}"; then - puid="--puid=${puid}" - fi - if test -n "${ppasswd}"; then - ppasswd="--ppasswd=${ppasswd}" - fi + test -n "${phost}" && phost="--phost=${phost}" + test -n "${pport}" && pport="--pport=${pport}" + test -n "${puid}" && puid="--puid=${puid}" + test -n "${ppasswd}" && ppasswd="--ppasswd=${ppasswd}" } function tryWget(){ -- GitLab