aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-15 23:26:43 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-15 23:26:43 +0000
commit95467b0cca2768a5ba16873f9673e39415eea463 (patch)
treef57f26da7988240677136269eebe691fa5595574 /tools
parentb5bcb2a744ebe0fe112b478e110d154e877e754c (diff)
The problem was that if you do, for example:
foo=`echo` $foo won't be empty, it'll include the newline at the end of the output of "echo". The same applies for any other command; strip newlines from the output of regtool to avoid that problem. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31889 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rwxr-xr-xtools/win-setup.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/win-setup.sh b/tools/win-setup.sh
index 286735cb30..1618ab9fd5 100755
--- a/tools/win-setup.sh
+++ b/tools/win-setup.sh
@@ -54,9 +54,12 @@ find_proxy() {
fi
# ...and wget can't fetch two registry keys because...?
- proxy_enabled=`regtool get /HKCU/Software/Microsoft/Windows/CurrentVersion/Internet\ Settings/ProxyEnable 2>/dev/null`
-echo "proxy_enabled is:"
-echo "$proxy_enabled" | od -bc
+ #
+ # If regtool prints a blank line, $proxy_enabled will
+ # not be a zero-length string, it'll be a newline.
+ # Strip out newlines so that doesn't happen.
+ #
+ proxy_enabled=`regtool get /HKCU/Software/Microsoft/Windows/CurrentVersion/Internet\ Settings/ProxyEnable 2>/dev/null | tr -d '\012'`
if [ -n "$proxy_enabled" -a "$proxy_enabled" -ne 0 ] ; then
export http_proxy=`regtool get /HKCU/Software/Microsoft/Windows/CurrentVersion/Internet\ Settings/ProxyServer 2>/dev/null`
echo "Using Internet Explorer proxy settings."