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" 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
} }