[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripts prelude

From: Daniel Skarda
Subject: Scripts prelude
Date: 29 Jul 2001 17:56:20 +0000
User-agent: Gnus/5.0806 (Gnus v5.8.6) Emacs/20.6


 prelude ("initial boilerplate") in scripts can be sometimes amusing for
 developers - it always loads _installed_ script and not file which was
 explicitly executed:

   main='(module-ref (resolve-module '\''(scripts whatever)) '\'main')'
   exec ${GUILE-guile} -c "(apply $main (cdr (command-line)))" "$@"

 I would like to propose change of standard mumbo jumbo to

   main='(module-ref (resolve-module '\''(scripts whatever)) '\'main')'
   exec ${GUILE-guile \} -l "$0" -c "(apply $main (cdr (command-line)))" "$@"

 that works quite good (at least for me :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]