Rev | Line | |
---|
[1] | 1 | BEGIN {started = 0; running = 0; if (style == "") { vdir = "/v1"; } else { vdir = ""; }} |
---|
| 2 | { |
---|
| 3 | line = $0; |
---|
| 4 | |
---|
| 5 | if ($1 == "%%package") |
---|
| 6 | { |
---|
| 7 | if (running) |
---|
| 8 | { |
---|
| 9 | print "END"; |
---|
| 10 | running = 0; |
---|
| 11 | } |
---|
| 12 | package = $2; |
---|
| 13 | print "cmt create " package " v1"; |
---|
| 14 | filename = package vdir "/cmt/requirements"; |
---|
| 15 | started = 1; |
---|
| 16 | } |
---|
| 17 | else if ($1 == "%%file") |
---|
| 18 | { |
---|
| 19 | if (running) |
---|
| 20 | { |
---|
| 21 | print "END"; |
---|
| 22 | running = 0; |
---|
| 23 | } |
---|
| 24 | file = $2; |
---|
| 25 | print "mkdir -p `dirname " package vdir "/" file "`"; |
---|
| 26 | filename = package vdir "/" file; |
---|
| 27 | started = 1; |
---|
| 28 | } |
---|
| 29 | else |
---|
| 30 | { |
---|
| 31 | gsub ("[$]", "\\$", line); |
---|
| 32 | print line; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | if (started) |
---|
| 36 | { |
---|
| 37 | started = 0; |
---|
| 38 | print "cat <<END >" filename; |
---|
| 39 | running = 1; |
---|
| 40 | } |
---|
| 41 | } |
---|
| 42 | |
---|
Note: See
TracBrowser
for help on using the repository browser.