Skip to content

Commit 2e7c939

Browse files
committed
Trying to fix the config update
1 parent aaa6e10 commit 2e7c939

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gvm

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ alwaysUpdateQ() {
9595
read -rp "[Yes: Y or y | No: Enter]? " yn
9696
if [[ "$yn" == "Y" || "$yn" == "y" ]]
9797
then
98-
echo "alwaysUpdate=true" >> "$gvmroot/.config"
98+
grep alwaysUpdate&> /dev/null < "$gvmroot/.config"
99+
if [[ $? == 1 ]]
100+
then
101+
sed -i "s/alwaysUpdate=false/alwaysUpdate=true/" "$gvmroot/.config"
102+
else
103+
printf "alwaysUpdate=true\n" >> "$gvmroot/.config"
104+
fi
99105
fi
100106
}
101107

0 commit comments

Comments
 (0)