]> code.delx.au - osx-proxyconf/blob - proxyconf.sh
Initial revision
[osx-proxyconf] / proxyconf.sh
1 #!/bin/bash
2
3 if [ "$(sysconfig -n "HTTPEnable")" -eq 1 ]; then
4 host="$(sysconfig -s "HTTPProxy")"
5 port="$(sysconfig -n "HTTPPort")"
6 echo "export http_proxy=\"http://${host}:${port}\""
7 fi
8 if [ "$(sysconfig -n "HTTPSEnable")" -eq 1 ]; then
9 host="$(sysconfig -s "HTTPSProxy")"
10 port="$(sysconfig -n "HTTPSPort")"
11 echo "export https_proxy=\"http://${host}:${port}\""
12 fi
13 if [ "$(sysconfig -n "FTPEnable")" -eq 1 ]; then
14 host="$(sysconfig -s "FTPProxy")"
15 port="$(sysconfig -n "FTPPort")"
16 echo "export ftp_proxy=\"http://${host}:${port}\""
17 fi