mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 20:20:53 +03:00
install_easy: do not write options if not edited
This commit is contained in:
parent
dafd4db470
commit
bf0adc2c01
@ -163,7 +163,6 @@ parse_vars_checked()
|
|||||||
local f="$1"
|
local f="$1"
|
||||||
shift
|
shift
|
||||||
while [ -n "$1" ]; do
|
while [ -n "$1" ]; do
|
||||||
|
|
||||||
parse_var_checked "$f" $1
|
parse_var_checked "$f" $1
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
@ -374,7 +373,7 @@ write_config_var()
|
|||||||
|
|
||||||
select_mode_mode()
|
select_mode_mode()
|
||||||
{
|
{
|
||||||
local v vars MODES="tpws tpws-socks nfqws filter custom"
|
local edited v vars MODES="tpws tpws-socks nfqws filter custom"
|
||||||
[ "$SYSTEM" = "macos" ] && MODES="tpws tpws-socks filter custom"
|
[ "$SYSTEM" = "macos" ] && MODES="tpws tpws-socks filter custom"
|
||||||
echo
|
echo
|
||||||
echo select MODE :
|
echo select MODE :
|
||||||
@ -396,12 +395,15 @@ select_mode_mode()
|
|||||||
echo $var=\"$v\"
|
echo $var=\"$v\"
|
||||||
done
|
done
|
||||||
ask_yes_no N "do you want to edit the options" || {
|
ask_yes_no N "do you want to edit the options" || {
|
||||||
|
[ -n "$edited" ] && {
|
||||||
for var in $vars; do
|
for var in $vars; do
|
||||||
write_config_var $var
|
write_config_var $var
|
||||||
done
|
done
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
edit_vars $vars
|
edit_vars $vars
|
||||||
|
edited=1
|
||||||
echo ..edited..
|
echo ..edited..
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user