Created
October 31, 2017 19:35
-
-
Save thild/dc387e50e46698b580dbd2cc7cb95bdc 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
| #!/bin/bash | |
| proxy=http://user:pass@proxy:8080/ | |
| if [ "$1" == "off" ]; then | |
| npm config rm proxy | |
| npm config rm https-proxy | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| else | |
| npm config set proxy $proxy | |
| npm config set https-proxy $proxy | |
| git config --global http.proxy $proxy | |
| git config --global https.proxy $proxy | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment