guile-devel
[Top][All Lists]
Advanced

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

[PATCH] scripts: scan-api: Make executable and add proper shebang.


From: Maxim Cournoyer
Subject: [PATCH] scripts: scan-api: Make executable and add proper shebang.
Date: Thu, 9 Nov 2023 22:42:03 -0500

* 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 via email to

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