unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: guile-devel@gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [PATCH] scripts: scan-api: Make executable and add proper shebang.
Date: Thu,  9 Nov 2023 22:42:03 -0500	[thread overview]
Message-ID: <20231110034207.29594-1-maxim.cournoyer@gmail.com> (raw)

* module/scripts/scan-api.scm: Invoke 'main' from shebang.
(main): Strip $0 from ARGS.
---

 module/scripts/scan-api.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 module/scripts/scan-api.scm

diff --git a/module/scripts/scan-api.scm b/module/scripts/scan-api.scm
old mode 100644
new mode 100755
index 86d07fc3e..e2ae99c23
--- a/module/scripts/scan-api.scm
+++ b/module/scripts/scan-api.scm
@@ -1,4 +1,7 @@
-;;; scan-api --- Scan and group interpreter and libguile interface elements
+#!/usr/bin/env -S guile -e '(@@ (scripts scan-api) main)' -s
+!#
+
+;; scan-api --- Scan and group interpreter and libguile interface elements
 
 ;; 	Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
 ;;
@@ -218,6 +221,8 @@
       (format #t ") ;; eof\n")))
   #t)
 
-(define main scan-api)
+(define (main args)
+  ;; Strip $0, which is the script name.
+  (apply scan-api (cdr args)))
 
 ;;; scan-api ends here

base-commit: 75cd95060fb1ea7586f0e4b9081694c6d61f1d3b
-- 
2.41.0




             reply	other threads:[~2023-11-10  3:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  3:42 Maxim Cournoyer [this message]
2023-11-10 16:07 ` [PATCH] scripts: scan-api: Make executable and add proper shebang Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231110034207.29594-1-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).