4
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
#!/bin/bash |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
|
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
[[ `type -P dconf` ]] || return |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
|
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
if [[ `dconf read /system/proxy/http/enabled` = "true" ]]; then |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
host=`dconf read /system/proxy/http/host` |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
host="${host//\'/}" |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
port=`dconf read /system/proxy/http/port` |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
export http_proxy="http://${host}:${port}/" |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
export HTTP_PROXY="http://${host}:${port}/" |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
|
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
no_proxy=`dconf read /system/proxy/ignore-hosts | grep -Po "(?<=')[^']+(?=')" | tr -d ' \n'` |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
export no_proxy="${no_proxy}" |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
export NO_PROXY="${no_proxy}" |
4:2fb825b3c3ef
Added .bash_dconf2env: export some useful vars (http_proxy and no_proxy) from dconf config files to environment.
Anton Shestakov <engored@ya.ru>
previous changes:
line |
diff
|
fi |