Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

cpm behind a proxy #19

Open
aloyse opened this Issue Feb 15, 2013 · 0 comments

Comments

Projects
None yet
1 participant

aloyse commented Feb 15, 2013

hi,

wanted to use cpm through a http proxy on a linux box, (using java and rhino)

to parse the environment proxy settings i modified the cpm script like so:

# diff cpm cpm.orig 
29,42c29
< 
<   ### use proxy settings
<   PROXY=""
<   if [ $http_proxy ]; then
<       PROXY="-Dhttp.proxyHost=`expr match \"$http_proxy\" '\(.*\):.*'` -Dhttp.proxyPort=`expr match \"$http_proxy\" '.*:\(.*\)'`"
<   fi  
<   if [ $https_proxy ]; then
<       PROXY="$PROXY -Dhttps.proxyHost=`expr match \"$https_proxy\" '\(.*\):.*'` -Dhttps.proxyPort=`expr match \"$https_proxy\" '.*:\(.*\)'`"
<   fi  
<   if [ $no_proxy ]; then
<       PROXY="$PROXY -Dhttp.nonProxyHosts=\"${no_proxy//,/|}\""
<   fi  
< 
<   java -classpath "$CPM_PATH/jars/js.jar" $PROXY org.mozilla.javascript.tools.shell.Main -opt -1 "$CPM_PATH/lib/cpm.js" $@

---
>   java -classpath "$CPM_PATH/jars/js.jar" org.mozilla.javascript.tools.shell.Main -opt -1 "$CPM_PATH/lib/cpm.js" $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment