From 727fcc5b814ac14535462d47c740c4fe6c79124b Mon Sep 17 00:00:00 2001 From: circa10a Date: Tue, 3 Oct 2017 21:20:42 -0500 Subject: [PATCH] add support for curl proxy --- install.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 59be349..4b294ff 100755 --- a/install.sh +++ b/install.sh @@ -9,6 +9,30 @@ fi home=$HOME +echo "Enter proxy info for curl? (y/n)" +echo +read answer +echo +if [ "$answer" == "y" ]; then + echo "Enter proxy info ::" + echo + read proxyinfo + echo + echo "proxy = $proxyinfo" >> $HOME/.curlrc + + if [ $? == 0 ]; then + echo "$HOME/.curlrc appended successfully." + echo + else + echo "writing ${HOME}/.curlrc failed" + fi + +elif [ "$answer" == "n" ]; then + : +else + echo "unrecognized input, skipping..." +fi + if [ ! $(pwd | sed 's/\/.*\/.*\///') = '.proxyhelper' ] then echo Exiting. This script should be run from "~/.proxyhelper" directory @@ -25,7 +49,7 @@ chmod +x $home/.proxyhelper/uninstall.sh # Needs for people with earlier version of PH # Which might clash if [ -x "$(command -v /usr/bin/phelp)" ] -then +then sudo rm /usr/bin/phelp fi if [ -x "$(command -v /usr/bin/zetproxy)" ] @@ -33,7 +57,7 @@ then sudo rm /usr/bin/zetproxy fi if [ -x "$(command -v /usr/bin/torpinger)" ] -then +then sudo rm /usr/bin/torpinger fi if [ -x "$(command -v /etc/network/if-up.d/zetproxy)" ] @@ -41,7 +65,7 @@ then sudo rm /etc/network/if-up.d/zetproxy fi if [ -x "$(command -v /etc/network/if-up.d/torpinger)" ] -then +then sudo rm /etc/network/if-up.d/torpinger fi # symlinks fail if the path is not absolute