Browse Source

contrib/scripts: use awk to modify interpreter substitution lines.

ng0 4 years ago
parent
commit
f6d13407fa

+ 1 - 1
contrib/scripts/Makefile.am

@@ -29,7 +29,7 @@ EXTRA_DIST = \
 CLEANFILES = \
   $(noinst_SCRIPTS)
 
-do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
+do_subst = $(AWK) -v py="$(PYTHON)" '{gsub("@PYTHONEXE@",py); print $$0}'
 
 # Use SUFFIX Extension rules, they are more portable for every
 # implementation of 'make'.

+ 1 - 1
contrib/scripts/gnunet-chk.py.in

@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
 # This file is part of GNUnet.
 # (C) 2013, 2018 Christian Grothoff (and other contributing authors)
 #

+ 1 - 1
contrib/scripts/gnunet-logread/Makefile.am

@@ -1,7 +1,7 @@
 # This Makefile.am is in the public domain
 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
 
-do_subst = $(SED) -e 's,[@]PERL[@],$(PERL),g'
+do_subst = $(AWK) -v py="$(PERL)" '{gsub("@PERLEXE@",py); print $$0}'
 
 SUFFIXES = .in
 

+ 1 - 1
contrib/scripts/gnunet-logread/gnunet-logread-ipc-sdedit.in

@@ -1,4 +1,4 @@
-#!@PERL@
+#!@PERLEXE@
 
 # 1. Start sdedit and enable 'RT diagram server' in 'Global preferences'.
 #

+ 1 - 1
contrib/scripts/gnunet-logread/gnunet-logread.in

@@ -1,4 +1,4 @@
-#!@PERL@
+#!@PERLEXE@
 # helper tool to make gnunet logs more readable
 # try 'gnunet-logread -h' for usage
 

+ 1 - 1
contrib/scripts/gnunet_janitor.py.in

@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
 #    This file is part of GNUnet.
 #    (C) 2011, 2018 Christian Grothoff (and other contributing authors)
 #

+ 1 - 1
contrib/scripts/gnunet_pyexpect.py.in

@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
 #    This file is part of GNUnet.
 #    (C) 2010, 2018 Christian Grothoff (and other contributing authors)
 #

+ 1 - 1
contrib/scripts/pydiffer.py.in

@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
 
 import os
 import sys

+ 1 - 1
contrib/scripts/removetrailingwhitespace.py.in

@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
 
 import sys
 import re

+ 1 - 1
contrib/scripts/terminate.py.in

@@ -1,4 +1,4 @@
-#!@PYTHON@
+#!@PYTHONEXE@
 #    This file is part of GNUnet.
 #    (C) 2011, 2018 Christian Grothoff (and other contributing authors)
 #