Guest User

Untitled

a guest
Jan 22nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/bin/bash
  2. # fixes problem with Chrome displaying "resolving Proxy" for 10+ seconds on each request
  3. # basically replace chrome binary with wrapper passing --no-proxy-server parameter
  4. set -u
  5. set -e
  6.  
  7. chromeBin="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
  8.  
  9. # make room for the wrapper
  10. if [ -e "${chromeBin}.bin" ]; then
  11. echo "you already ran this script"
  12. exit 1
  13. else
  14. echo "replacing Chrome binary with wrapper"
  15. mv "$chromeBin" "${chromeBin}.bin"
  16. fi
  17.  
  18. # write the wrapper
  19. echo '#!/bin/bash' >> "$chromeBin"
  20. echo "exec \"${chromeBin}.bin\" --args --no-proxy-server" >> "$chromeBin"
  21. chmod u+x "$chromeBin"
Add Comment
Please, Sign In to add comment