| www.delorie.com/gnu/docs/guile/guile_54.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
See template file PROGRAM for a quick start.
Programs must follow the executable module convention, documented here:
(define-module (scripts PROGRAM) :export (PROGRAM)) |
Feel free to export other definitions useful in the module context.
(define main PROGRAM) |
However, `main' must NOT be exported.
#!/bin/sh
main='(module-ref (resolve-module '\''(scripts PROGRAM)) '\'main')'
exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@"
!#
|
Following these conventions allows the program file to be used as module
(scripts PROGRAM) in addition to as a standalone executable. Please
also include a helpful Commentary section w/ some usage info.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |