install_easy: do not write options if not edited

This commit is contained in:
bol-van 2021-11-19 13:49:36 +03:00
parent dafd4db470
commit bf0adc2c01

View File

@ -163,7 +163,6 @@ parse_vars_checked()
local f="$1"
shift
while [ -n "$1" ]; do
parse_var_checked "$f" $1
shift
done
@ -374,7 +373,7 @@ write_config_var()
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"
echo
echo select MODE :
@ -396,12 +395,15 @@ select_mode_mode()
echo $var=\"$v\"
done
ask_yes_no N "do you want to edit the options" || {
for var in $vars; do
write_config_var $var
done
[ -n "$edited" ] && {
for var in $vars; do
write_config_var $var
done
}
break
}
edit_vars $vars
edited=1
echo ..edited..
done
}