aboutsummaryrefslogtreecommitdiff
path: root/release/scripts
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-03-05 16:20:53 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-03-05 16:20:53 +0000
commit0a48fbc0824f1b0ef08aa95d1c10a3a81aa2edee (patch)
treeee528d3f71ad287c55fea2a59a6402e7d645d180 /release/scripts
parentcac05815d443cc0564276a6113e2481917ca8e87 (diff)
downloadsrc-0a48fbc0824f1b0ef08aa95d1c10a3a81aa2edee.tar.gz
src-0a48fbc0824f1b0ef08aa95d1c10a3a81aa2edee.zip
Support a config tag to flag a file that should be merge on upgrade
Notes
Notes: svn path=/projects/release-pkg/; revision=279660
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/mtree-to-plist.awk28
1 files changed, 22 insertions, 6 deletions
diff --git a/release/scripts/mtree-to-plist.awk b/release/scripts/mtree-to-plist.awk
index 9b7dd991f50d..e61805f2cd01 100644
--- a/release/scripts/mtree-to-plist.awk
+++ b/release/scripts/mtree-to-plist.awk
@@ -25,14 +25,30 @@
if (length(tags) == 0)
next
if (tags ~ /package=/) {
- gsub(/package=/,"",tags)
- gsub(/,/, "-", tags)
- gsub(/runtime-/, "", tags)
- pkg=tags
+ ext = pkgname = ""
+ split(tags, a, ",");
+ for (i in a) {
+ if (a[i] ~ /^package=/) {
+ pkgname=a[i]
+ gsub(/package=/, "", pkgname)
+ } else if (a[i] == "config") {
+ type="config"
+ } else {
+ ext=a[i]
+ }
+ }
+ if (length(ext) > 0) {
+ if (pkgname == "runtime") {
+ pkgname=ext
+ } else {
+ pkgname=pkgname"-"ext
+ }
+ }
} else {
- pkg=tags
+ print "No packages specified in line: $0" > 2
+ next
}
- output=pkg".plist"
+ output=pkgname".plist"
print "@"type"("uname","gname","mode","flags") " $1 > output
}