mirror of
https://github.com/limosek/zaf.git
synced 2024-11-21 18:09:06 +01:00
Added proxy setting support
This commit is contained in:
parent
6697df6519
commit
b535eb58e2
@ -259,6 +259,7 @@ zaf_configure(){
|
|||||||
zaf_get_option ZAF_BIN_DIR "Directory to put binaries" "/usr/bin" "$INSTALL_MODE"
|
zaf_get_option ZAF_BIN_DIR "Directory to put binaries" "/usr/bin" "$INSTALL_MODE"
|
||||||
zaf_get_option ZAF_PLUGINS_DIR "Plugins directory" "${ZAF_LIB_DIR}/plugins" "$INSTALL_MODE"
|
zaf_get_option ZAF_PLUGINS_DIR "Plugins directory" "${ZAF_LIB_DIR}/plugins" "$INSTALL_MODE"
|
||||||
[ "${ZAF_GIT}" = 1 ] && zaf_get_option ZAF_REPO_GITURL "Git plugins repository" "https://github.com/limosek/zaf-plugins.git" "$INSTALL_MODE"
|
[ "${ZAF_GIT}" = 1 ] && zaf_get_option ZAF_REPO_GITURL "Git plugins repository" "https://github.com/limosek/zaf-plugins.git" "$INSTALL_MODE"
|
||||||
|
zaf_get_option ZAF_PROXY "http proxy used by zaf" "" "$INSTALL_MODE"
|
||||||
zaf_get_option ZAF_REPO_URL "Plugins http[s] repository" "https://raw.githubusercontent.com/limosek/zaf-plugins/master/" "$INSTALL_MODE"
|
zaf_get_option ZAF_REPO_URL "Plugins http[s] repository" "https://raw.githubusercontent.com/limosek/zaf-plugins/master/" "$INSTALL_MODE"
|
||||||
zaf_get_option ZAF_REPO_DIR "Plugins directory" "${ZAF_LIB_DIR}/repo" "$INSTALL_MODE"
|
zaf_get_option ZAF_REPO_DIR "Plugins directory" "${ZAF_LIB_DIR}/repo" "$INSTALL_MODE"
|
||||||
|
|
||||||
@ -301,6 +302,7 @@ zaf_configure(){
|
|||||||
zaf_set_option ZAF_BIN_DIR "$ZAF_BIN_DIR"
|
zaf_set_option ZAF_BIN_DIR "$ZAF_BIN_DIR"
|
||||||
zaf_set_option ZAF_PLUGINS_DIR "$ZAF_PLUGINS_DIR"
|
zaf_set_option ZAF_PLUGINS_DIR "$ZAF_PLUGINS_DIR"
|
||||||
zaf_set_option ZAF_REPO_URL "$ZAF_REPO_URL"
|
zaf_set_option ZAF_REPO_URL "$ZAF_REPO_URL"
|
||||||
|
zaf_set_option ZAF_PROXY "$ZAF_PROXY"
|
||||||
[ "${ZAF_GIT}" = 1 ] && zaf_set_option ZAF_REPO_GITURL "$ZAF_REPO_GITURL"
|
[ "${ZAF_GIT}" = 1 ] && zaf_set_option ZAF_REPO_GITURL "$ZAF_REPO_GITURL"
|
||||||
zaf_set_option ZAF_REPO_DIR "$ZAF_REPO_DIR"
|
zaf_set_option ZAF_REPO_DIR "$ZAF_REPO_DIR"
|
||||||
zaf_set_option ZAF_AGENT_CONFIG "$ZAF_AGENT_CONFIG"
|
zaf_set_option ZAF_AGENT_CONFIG "$ZAF_AGENT_CONFIG"
|
||||||
@ -398,6 +400,9 @@ if ! [ -f README.md ]; then
|
|||||||
ZAF_RAW_URL="https://raw.githubusercontent.com/limosek/zaf"
|
ZAF_RAW_URL="https://raw.githubusercontent.com/limosek/zaf"
|
||||||
export ZAF_TMP_DIR="/tmp/zaf-installer"
|
export ZAF_TMP_DIR="/tmp/zaf-installer"
|
||||||
export ZAF_DIR="$ZAF_TMP_DIR/zaf"
|
export ZAF_DIR="$ZAF_TMP_DIR/zaf"
|
||||||
|
if [ -n "$ZAF_PROXY" ]; then
|
||||||
|
export ALL_PROXY="$ZAF_PROXY"
|
||||||
|
fi
|
||||||
mkdir -p $ZAF_TMP_DIR
|
mkdir -p $ZAF_TMP_DIR
|
||||||
if ! zaf_which curl >/dev/null;
|
if ! zaf_which curl >/dev/null;
|
||||||
then
|
then
|
||||||
@ -447,6 +452,9 @@ for pair in "$@"; do
|
|||||||
zaf_wrn "Overriding $option from cmdline."
|
zaf_wrn "Overriding $option from cmdline."
|
||||||
done
|
done
|
||||||
[ -z "$C_ZAF_TMP_DIR" ] && C_ZAF_TMP_DIR="/tmp/"
|
[ -z "$C_ZAF_TMP_DIR" ] && C_ZAF_TMP_DIR="/tmp/"
|
||||||
|
if [ -n "$ZAF_PROXY" ]; then
|
||||||
|
export ALL_PROXY="$ZAF_PROXY"
|
||||||
|
fi
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
interactive)
|
interactive)
|
||||||
|
4
zaf
4
zaf
@ -25,6 +25,10 @@ ZAF_CFG_FILE="/etc/zaf.conf"
|
|||||||
[ -n "$secondstage" ] && exec $0 $params
|
[ -n "$secondstage" ] && exec $0 $params
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$ZAF_PROXY" ]; then
|
||||||
|
export ALL_PROXY="$ZAF_PROXY"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f ./lib/zaf.lib.sh ]; then
|
if [ -f ./lib/zaf.lib.sh ]; then
|
||||||
. ./lib/zaf.lib.sh
|
. ./lib/zaf.lib.sh
|
||||||
. ./lib/plugin.lib.sh
|
. ./lib/plugin.lib.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user