[rebase - The rebase tool, core of the automatic rebase facility during postinstall] branch master, updated. f8a2b817961781810a338999268277a68d9d604b

corinna-9JcytcrH/[email protected]
Newsgroups gmane.os.cygwin.cvs.apps
Message-ID <[email protected]>


https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=f8a2b817961781810a338999268277a68d9d604b

commit f8a2b817961781810a338999268277a68d9d604b
Author: Michael Haubenwallner <michael.haubenwallner-X1qIfqiZ0iHYPTWX/[email protected]>
Date:   Wed Apr 10 14:34:31 2019 +0200

    Introduce --with-posix-shell configure flag.
    
    Some distros prefer a POSIX shell other than /bin/dash, which is the
    default.  Remove --with-dash configure flag, is POSIX shell default.


Diff:
---
 Makefile.in   |    4 ++--
 configure.ac  |   18 +++++++++++++-----
 peflagsall.in |    2 +-
 rebaseall.in  |    2 +-
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index e984070..34c4684 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -53,7 +53,7 @@ LN_S = @LN_S@
 SED = @SED@
 EGREP = @EGREP@
 FGREP = @FGREP@
-ASH = @ASH@
+POSIXSHELL = @POSIXSHELL@
 
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(srcdir)/imagehelper
 DEFS = @DEFS@ -DVERSION='"$(PACKAGE_VERSION)"' -DLIB_VERSION='"$(LIB_VERSION)"' -DSYSCONFDIR='"$(sysconfdir)"'
@@ -128,7 +128,7 @@ edit = sed \
 	-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
 	-e 's|@prefix[@]|$(prefix)|g' \
 	-e 's|@exec_prefix[@]|$(exec_prefix)|g' \
-	-e 's|@ASH[@]|$(ASH)|g' \
+	-e 's|@POSIXSHELL[@]|$(POSIXSHELL)|g' \
 	-e 's|@DEFAULT_OFFSET_VALUE[@]|$(DEFAULT_OFFSET_VALUE)|g'
 
 rebaseall peflagsall: Makefile
diff --git a/configure.ac b/configure.ac
index 1dc9bf4..d539dbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,11 +8,19 @@ AC_CONFIG_SRCDIR([peflags.c])
 AC_PREFIX_DEFAULT([/usr])
 AC_CANONICAL_HOST
 
-AC_ARG_WITH([dash], AS_HELP_STRING([use dash instead of ash]),
-            [], [with_dash=no])
-ASH=ash
-AS_IF([test "x$with_dash" != xno], [ASH=dash])
-AC_SUBST([ASH])
+AC_MSG_CHECKING([for POSIX shell to use in scripts])
+AC_ARG_WITH([posix-shell],
+			AS_HELP_STRING([--with-posix-shell=/bin/dash],
+						   [POSIX shell to use for scripts, default=/bin/dash]),
+			[AS_CASE([$with_posix_shell],
+					 [yes|no|''],
+					 [AC_MSG_ERROR([Need shell path for --with-posix-shell, got '$with_posix_shell'.])],
+					 [/*],
+					 [POSIXSHELL=$with_posix_shell],
+					 [AC_MSG_ERROR([Need absolute path for --with-posix-shell, got '$with_posix_shell'.])])],
+			[POSIXSHELL=/bin/dash])
+AC_SUBST([POSIXSHELL])
+AC_MSG_RESULT([$POSIXSHELL])
 
 AC_PROG_INSTALL
 AC_PROG_MKDIR_P
diff --git a/peflagsall.in b/peflagsall.in
index d838201..6839db4 100644
--- a/peflagsall.in
+++ b/peflagsall.in
@@ -1,4 +1,4 @@
-#!/bin/@ASH@
+#!@POSIXSHELL@
 
 #
 # Copyright (c) 2009,2011 Charles Wilson
diff --git a/rebaseall.in b/rebaseall.in
index 076cc32..af4fe3f 100644
--- a/rebaseall.in
+++ b/rebaseall.in
@@ -1,4 +1,4 @@
-#!/bin/@ASH@
+#!@POSIXSHELL@
 
 #
 # Copyright (c) 2003, 2005, 2006, 2008, 2011, 2012 Jason Tishler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.