Convert tagged directories in mtree into their plist form
This commit is contained in:
parent
0b6fca90d4
commit
78dacb171d
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/awk
|
#!/usr/bin/awk
|
||||||
/^[^#]/ {
|
/^[^#]/ {
|
||||||
gsub(/^\./,"", $1)
|
gsub(/^\./,"", $1)
|
||||||
uname = gname = mode = flags = tags = ""
|
uname = gname = mode = flags = tags = type = ""
|
||||||
for (i=2; i<=NF; i++) {
|
for (i=2; i<=NF; i++) {
|
||||||
if ($i ~ /^uname=/) {
|
if ($i ~ /^uname=/) {
|
||||||
uname=$i
|
uname=$i
|
||||||
@ -18,6 +18,8 @@
|
|||||||
} else if ($i ~ /^tags=/) {
|
} else if ($i ~ /^tags=/) {
|
||||||
tags=$i
|
tags=$i
|
||||||
gsub(/tags=/, "", tags)
|
gsub(/tags=/, "", tags)
|
||||||
|
} else if ($i ~ /^type=dir/) {
|
||||||
|
type="dir"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (length(tags) == 0)
|
if (length(tags) == 0)
|
||||||
@ -32,5 +34,5 @@
|
|||||||
}
|
}
|
||||||
output=pkg".plist"
|
output=pkg".plist"
|
||||||
|
|
||||||
print "@("uname","gname","mode","flags") " $1 > output
|
print "@"type"("uname","gname","mode","flags") " $1 > output
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user