Test expression fixed.
Using test statement [...] was wrong for this type of check. Change-Id: Ie6640189206084c89f665478d93ef2444afcfd5b Fixes: MRN-903
This commit is contained in:
parent
df201fd6b5
commit
d3fff70d29
|
@ -47,7 +47,7 @@ function iniset {
|
|||
sed -i -e "s/^\($option[ \t]*=[ \t]*\).*$/\1$value/" "$file"
|
||||
else
|
||||
# Check if section already exists
|
||||
if [ ! $(grep -q "^\[$section\]" "$file") ]; then
|
||||
if ! grep -q "^\[$section\]" "$file" ; then
|
||||
# Add section at the end
|
||||
echo -e "\n[$section]" >>"$file"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue