summaryrefslogtreecommitdiff
path: root/lib/builder-utils.sh
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2013-03-07 21:43:46 (GMT)
committer Mario Fetka <[email protected]>2013-03-07 21:43:46 (GMT)
commita7f8a81d46d05161a23c4d3c8057abedbd199d24 (patch)
tree5489136d455390ebc6b3e8dc682e541230740bef /lib/builder-utils.sh
parent75adc590d0668263b28ea0c1bf3d83015ec16b46 (diff)
new samples and control file writer
Diffstat (limited to 'lib/builder-utils.sh')
-rw-r--r--lib/builder-utils.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh
index 667c644..ca60235 100644
--- a/lib/builder-utils.sh
+++ b/lib/builder-utils.sh
@@ -321,3 +321,21 @@ write_ini_file() {
done
}
+###################
+# Write control file
+#
+# Create a ini file containing needed information for package uninstall
+#
+# Parameter
+# file: file to create / modify
+#
+###################
+write_control_file() {
+ local control_file=$1
+ local control_section=$2
+ local control_option=$3
+ local control_value=$4
+
+ sed -i -e "/^\[$control_section\]/,/^\[.*\]/ s|^\($control_option[ \t]*:[ \t]*\).*$|\1$control_value|" "$control_file"
+}
+

Powered by Domaintechnik.at | Hosting - Domain - Webspace