]> code.delx.au - osx-proxyconf/blobdiff - proxyconf.sh
Autodetect value types
[osx-proxyconf] / proxyconf.sh
index 61b0f50f86004adf93cba29b98ce79f85e5db396..78b537c43ea50a1dd43cb932afbafdeb387ba8da 100755 (executable)
@@ -1,17 +1,17 @@
 #!/bin/bash
 
-if [ "$(sysconfig -n "HTTPEnable")" -eq 1 ]; then
-       host="$(sysconfig -s "HTTPProxy")"
-       port="$(sysconfig -n "HTTPPort")"
+if [ "$(sysconfig "HTTPEnable")" -eq 1 ]; then
+       host="$(sysconfig "HTTPProxy")"
+       port="$(sysconfig "HTTPPort")"
        echo "export http_proxy=\"http://${host}:${port}\""
 fi
-if [ "$(sysconfig -n "HTTPSEnable")" -eq 1 ]; then
-       host="$(sysconfig -s "HTTPSProxy")"
-       port="$(sysconfig -n "HTTPSPort")"
+if [ "$(sysconfig "HTTPSEnable")" -eq 1 ]; then
+       host="$(sysconfig "HTTPSProxy")"
+       port="$(sysconfig "HTTPSPort")"
        echo "export https_proxy=\"http://${host}:${port}\""
 fi
-if [ "$(sysconfig -n "FTPEnable")" -eq 1 ]; then
-       host="$(sysconfig -s "FTPProxy")"
-       port="$(sysconfig -n "FTPPort")"
+if [ "$(sysconfig "FTPEnable")" -eq 1 ]; then
+       host="$(sysconfig "FTPProxy")"
+       port="$(sysconfig "FTPPort")"
        echo "export ftp_proxy=\"http://${host}:${port}\""
 fi