http=$(mdw-conf http-proxy none)
case "${http_proxy-none},$http" in
*,none) ;;
+ none,*://*) http_proxy=$http; export http_proxy ;;
none,*) http_proxy=http://$http/; export http_proxy ;;
esac
https=$(mdw-conf https-proxy none)
case "${https_proxy-none},$https,${http_proxy-none}" in
*,none,none) ;;
none,none,*) https_proxy=$http_proxy; export https_proxy ;;
+ none,*://*,*) https_proxy=$https; export https_proxy ;;
none,*,*) https_proxy=http://$https/; export https_proxy ;;
esac
ftp=$(mdw-conf ftp-proxy none)
case "${ftp_proxy-none},$ftp,${http_proxy-none}" in
*,none,none) ;;
none,none,*) ftp_proxy=$http_proxy; export ftp_proxy ;;
+ none,*://*,*) ftp_proxy=$https; export ftp_proxy ;;
none,*,*) ftp_proxy=http://$ftp/; export ftp_proxy ;;
esac
unset http https ftp