diff --git a/common.sh b/common.sh index 2a3ac18ebfecef8408c207c95a599031cf5fea1a..699b9ca814722ef3fb5888188b6ac6be3919acf5 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(){