Rev | Line | |
---|
[1] | 1 | #----------------------------------------------------------- |
---|
| 2 | # Copyright Christian Arnault LAL-Orsay CNRS |
---|
| 3 | # arnault@lal.in2p3.fr |
---|
| 4 | # See the complete license in cmt_license.txt "http://www.cecill.info". |
---|
| 5 | #----------------------------------------------------------- |
---|
| 6 | |
---|
| 7 | BEGIN {started = 0; running = 0; if (style == "") { vdir = "/v1"; } else { vdir = ""; }} |
---|
| 8 | { |
---|
| 9 | line = $0; |
---|
| 10 | |
---|
| 11 | if ($1 == "%%package") |
---|
| 12 | { |
---|
| 13 | if (running) |
---|
| 14 | { |
---|
| 15 | print "END"; |
---|
| 16 | running = 0; |
---|
| 17 | } |
---|
| 18 | package = $2; |
---|
| 19 | print "cmt create " package " v1"; |
---|
| 20 | filename = package vdir "/cmt/requirements"; |
---|
| 21 | started = 1; |
---|
| 22 | } |
---|
| 23 | else if ($1 == "%%file") |
---|
| 24 | { |
---|
| 25 | if (running) |
---|
| 26 | { |
---|
| 27 | print "END"; |
---|
| 28 | running = 0; |
---|
| 29 | } |
---|
| 30 | file = $2; |
---|
| 31 | print "mkdir -p `dirname " package vdir "/" file "`"; |
---|
| 32 | filename = package vdir "/" file; |
---|
| 33 | started = 1; |
---|
| 34 | } |
---|
| 35 | else |
---|
| 36 | { |
---|
| 37 | gsub ("[$]", "\\$", line); |
---|
| 38 | print line; |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | if (started) |
---|
| 42 | { |
---|
| 43 | started = 0; |
---|
| 44 | print "cat <<END >" filename; |
---|
| 45 | running = 1; |
---|
| 46 | } |
---|
| 47 | } |
---|
| 48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.