Created
June 18, 2013 15:41
-
-
Save janosgyerik/5806456 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # usage: PW=the_pw . ~/scripts/proxy.sh" | |
| # edit this depending on your environment | |
| template='http://USERNAME:$PW@PROXYURL:PROXYPORT' | |
| if test "$PW"; then | |
| clear | |
| echo "* note: cleared the screen for your safety" | |
| echo "* using proxy address template: $template" | |
| proxy_address=$(eval echo $template) | |
| export http_proxy=$proxy_address | |
| echo "* updated http_proxy using the template and PW" | |
| export https_proxy=$proxy_address | |
| echo "* updated https_proxy using the template and PW" | |
| HISTFILE_saved=$HISTFILE | |
| HISTFILE= | |
| echo "* unset HISTFILE for your safety, saved its old value in HISTFILE_save | |
| d" | |
| else | |
| echo "# usage: PW=the_pw . ~/scripts/proxy.sh" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment