Support a config tag to flag a file that should be merge on upgrade

This commit is contained in:
Baptiste Daroussin 2015-03-05 16:20:53 +00:00
parent cac05815d4
commit 0a48fbc082
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/release-pkg/; revision=279660

View File

@ -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
}