diff mbox series

[bug#66605,v5] teams: Adjust shebang to use 'guix repl'.

Message ID 7ab82f90b104c99781b759d3799ae0553ab256f9.1698005256.git.maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#66605,v5] teams: Adjust shebang to use 'guix repl'. | expand

Commit Message

Maxim Cournoyer Oct. 22, 2023, 8:07 p.m. UTC
This ensures the correct Guix dependencies are always available for the
script.

* etc/teams.scm.in: Rename to...
* etc/teams.scm: ... this.  Adjust shebang.
* .gitignore: No longer ignore it.
* configure.ac: Do not process it with AC_CONFIG_FILES.

Fixes: https://issues.guix.gnu.org/66605
---

Changes in v5:
 - Redirect command -v output to /dev/null

 .gitignore                      | 1 -
 configure.ac                    | 1 -
 etc/{teams.scm.in => teams.scm} | 8 ++++++--
 3 files changed, 6 insertions(+), 4 deletions(-)
 rename etc/{teams.scm.in => teams.scm} (99%)
 mode change 100644 => 100755


base-commit: faeebdc37e9137d62e11175e83988f77496a6641

Comments

Clément Lassieur Oct. 22, 2023, 8:23 p.m. UTC | #1
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> This ensures the correct Guix dependencies are always available for the
> script.
>
> * etc/teams.scm.in: Rename to...
> * etc/teams.scm: ... this.  Adjust shebang.
> * .gitignore: No longer ignore it.
> * configure.ac: Do not process it with AC_CONFIG_FILES.
>
> Fixes: https://issues.guix.gnu.org/66605
> ---

Sounds good to me!  Of course, please commit it as your own.

Thank you very much,
Clément
Maxim Cournoyer Oct. 23, 2023, 12:39 a.m. UTC | #2
Hi,

Clément Lassieur <clement@lassieur.org> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> This ensures the correct Guix dependencies are always available for the
>> script.
>>
>> * etc/teams.scm.in: Rename to...
>> * etc/teams.scm: ... this.  Adjust shebang.
>> * .gitignore: No longer ignore it.
>> * configure.ac: Do not process it with AC_CONFIG_FILES.
>>
>> Fixes: https://issues.guix.gnu.org/66605
>> ---
>
> Sounds good to me!  Of course, please commit it as your own.
>
> Thank you very much,
> Clément

Done!  Thanks for the report!
diff mbox series

Patch

diff --git a/.gitignore b/.gitignore
index 543dc1c655..0f74b5da3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,7 +68,6 @@ 
 /doc/version.texi
 /doc/version-*.texi
 /etc/committer.scm
-/etc/teams.scm
 /etc/gnu-store.mount
 /etc/guix-daemon.cil
 /etc/guix-daemon.conf
diff --git a/configure.ac b/configure.ac
index d817f620cf..ecbd596a34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -281,7 +281,6 @@  AC_CONFIG_FILES([Makefile
                  guix/config.scm])
 
 AC_CONFIG_FILES([etc/committer.scm], [chmod +x etc/committer.scm])
-AC_CONFIG_FILES([etc/teams.scm], [chmod +x etc/teams.scm])
 AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
 AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
   [chmod +x pre-inst-env])
diff --git a/etc/teams.scm.in b/etc/teams.scm
old mode 100644
new mode 100755
similarity index 99%
rename from etc/teams.scm.in
rename to etc/teams.scm
index 55242caad1..0b25955701
--- a/etc/teams.scm.in
+++ b/etc/teams.scm
@@ -1,5 +1,9 @@ 
-#!@GUILE@ \
---no-auto-compile -s
+#!/bin/sh
+# Extra care is taken here to ensure this script can run in most environments,
+# since it is invoked by 'git send-email'.
+pre_inst_env_maybe=
+command -v guix > /dev/null || pre_inst_env_maybe=./pre-inst-env
+exec $pre_inst_env_maybe guix repl -- "$0" "$@"
 !#
 
 ;;; GNU Guix --- Functional package management for GNU