Don't combine sed options
Combining '-i -e' into '-ie' changes behaviour, don't do that
Change-Id: Ice46c6b4f899b4c76f355cc88241dd33bc60f459
diff --git a/functions b/functions
index 9dab759..f2b12e2 100644
--- a/functions
+++ b/functions
@@ -419,7 +419,7 @@
local file=$1
local section=$2
local option=$3
- sed -ie "/^\[ *$section *\]/,/^\[.*\]/ s|^\($option[ \t]*=.*$\)|#\1|" $file
+ sed -i -e "/^\[ *$section *\]/,/^\[.*\]/ s|^\($option[ \t]*=.*$\)|#\1|" $file
}
# Uncomment an option in an INI file
@@ -428,7 +428,7 @@
local file=$1
local section=$2
local option=$3
- sed -ie "/^\[ *$section *\]/,/^\[.*\]/ s|[^ \t]*#[ \t]*\($option[ \t]*=.*$\)|\1|" $file
+ sed -i -e "/^\[ *$section *\]/,/^\[.*\]/ s|[^ \t]*#[ \t]*\($option[ \t]*=.*$\)|\1|" $file
}
@@ -457,12 +457,12 @@
fi
if [[ -z "$(iniget $file $section $option)" ]]; then
# Add it
- sed -ie "/^\[ *$section *\]/ a\\
+ sed -i -e "/^\[ *$section *\]/ a\\
$option = $value
" $file
else
# Replace it
- sed -ie "/^\[ *$section *\]/,/^\[.*\]/ s|^\($option[ \t]*=[ \t]*\).*$|\1$value|" $file
+ sed -i -e "/^\[ *$section *\]/,/^\[.*\]/ s|^\($option[ \t]*=[ \t]*\).*$|\1$value|" $file
fi
}