added a bit of protection in case logic is wrong

This commit is contained in:
inxi-svn 2011-04-26 19:46:59 +00:00
parent ddd3258580
commit 9e5426b180

1
inxi
View file

@ -914,6 +914,7 @@ select_default_color_scheme()
echo "$config_variable=$user_selection" >> $config_file echo "$config_variable=$user_selection" >> $config_file
else else
print_screen_output "Updating config file for $COLOR_SELECTION color scheme now..." print_screen_output "Updating config file for $COLOR_SELECTION color scheme now..."
touch $config_file # just in case of logic error above
sed -i "s/$config_variable=.*/$config_variable=$user_selection/" $config_file sed -i "s/$config_variable=.*/$config_variable=$user_selection/" $config_file
fi fi
# file exists now so we can go on to cleanup # file exists now so we can go on to cleanup