source: project/egg-template.scm

Last change on this file was 628, checked in by felix, 11 years ago

egg-post-commit modifications, small fixes

File size: 2.3 KB
Line 
1#!/bin/sh
2#| ;;;; egg-template.scm -*- Scheme -*-
3exec csi -s $0 "$@"
4|#
5
6(use utils posix)
7
8
9(define *eggname*
10  (match (command-line-arguments)
11    ((name) name) ) )
12
13
14(unless (file-exists? *eggname*)
15  (create-directory *eggname*) )
16
17(current-directory *eggname*)
18
19(current-output-port (open-output-file "doc.scm"))
20
21(print #<#EOF
22;;;; doc.scm -*- Scheme -*-
23
24(use eggdoc)
25
26(define license
27"Copyright (c) 2006, %%AUTHOR%%.  All rights reserved.
28
29Permission is hereby granted, free of charge, to any person obtaining a
30copy of this software and associated documentation files (the Software),
31to deal in the Software without restriction, including without limitation
32the rights to use, copy, modify, merge, publish, distribute, sublicense,
33and/or sell copies of the Software, and to permit persons to whom the
34Software is furnished to do so, subject to the following conditions:
35
36The above copyright notice and this permission notice shall be included
37in all copies or substantial portions of the Software.
38
39THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
43OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
44ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45OTHER DEALINGS IN THE SOFTWARE.")
46
47(define doc
48  `((eggdoc:begin
49     (name "#{*eggname*}")
50     (description (p "%%DESCRIPTION%%"))
51     
52     (author "%%AUTHOR%%")
53
54     (history
55      (version "1.0" "Initial release"))
56
57     (requires 
58      (url "%%URL%%" "%%EGGNAME%") ...)
59
60     (usage)
61     (download "%%FILE%%")
62
63     (documentation
64      (p "%%TEXT%%") 
65
66     (group
67      (procedure "(%%PROCNAME%% ...)"
68                 (p "%%PROCDOC%%") )
69     
70     (examples 
71      (p "%%EXAMPLES%%") )
72     (section "License" (pre ,license))))))
73
74(eggdoc->html doc)
75
76EOF
77)
78
79(close-output-port (current-output-port))
80(current-output-port (open-output-file (make-pathname #f *eggname* "meta")))
81
82(print #<#EOF
83;;; #{*eggname*}.meta -*- Scheme -*-
84
85(
86 (egg "#{*eggname*}.egg")
87 (synopsis "%%SYNOPSIS%%")
88 ;(needs %%EGGNAME%% ...)
89 (category web)
90 (license "BSD")
91 (author "%%AUTHOR%%")
92 (files "#{*eggname*}.setup" "#{*eggname*}.scm" "#{*eggname*}.html")
93)
94
95
96EOF
97)
Note: See TracBrowser for help on using the repository browser.