equal
deleted
inserted
replaced
|
1 # If invoked with -v FUNCTION=name, then just print $1 (s|/|---|). |
|
2 # Otherwise we expect to be invoked with TARGET=<whatever>, then if |
|
3 # s|/|---| on $1 matches TARGET, we generate a manifest. |
|
4 { |
|
5 if (substr($1, 1, 1) == "#") { # Skip comments. |
|
6 continue |
|
7 } |
|
8 fmri=$1 |
|
9 split(fmri, a, "@") |
|
10 gsub("/", "---", a[1]) |
|
11 target = sprintf("%s.p5m", a[1]) |
|
12 if (FUNCTION == "name") { |
|
13 printf "%s\n", target |
|
14 continue |
|
15 } |
|
16 if (target != TARGET) { |
|
17 continue |
|
18 } |
|
19 printf "set name=pkg.fmri value=pkg:/%s\n", fmri |
|
20 if (NF == 2) { |
|
21 print "set name=pkg.renamed value=true" |
|
22 printf "depend type=require fmri=%s\n", $2 |
|
23 } else { |
|
24 print "set name=pkg.obsolete value=true" |
|
25 } |
|
26 print "set name=org.opensolaris.consolidation value=$(CONSOLIDATION)" |
|
27 exit 0 # We're done; no point continuing. |
|
28 } |