Skip to content

Instantly share code, notes, and snippets.

@pokutuna
Created April 29, 2011 17:42
Show Gist options
  • Save pokutuna/948677 to your computer and use it in GitHub Desktop.
Save pokutuna/948677 to your computer and use it in GitHub Desktop.
proxy='http://proxy.ksc.kwansei.ac.jp:8080'
apply_proxy()
{
export http_proxy=$1
export ALL_PROXY=$1
git config --global http.proxy "$1"
}
if [ -n "$http_proxy" ]; then
echo 'unset proxy'
apply_proxy ""
else
echo 'set proxy'
apply_proxy $proxy
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment