tech-pkg archive

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

[PATCH] If the shell fails the echo test, try /bin/bash



Don't have specific code for GNU/kFreeBSD. It is handled the same.
---
 bootstrap/bootstrap | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index a9fdc4e66..7295bc893 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -404,12 +404,19 @@ esac
 # On all Debian GNU/kFreeBSD 7.0, /bin/sh is a symlink to /bin/dash, and
 # use /bin/bash. bootstrap forces /bin/bash is used.
 dash_echo_test=`$bootstrap_sh -c 'echo "\\100"'`
-if [ "$opsys" != "GNUkFreeBSD" ] && [ "$dash_echo_test" = "@" ]; then
-	{ echo "ERROR: Your shell's echo command is not BSD-compatible."
-	  echo "ERROR: Please select another shell by setting the environment"
-	  echo "ERROR: variable SH."
-	} 1>&2
-	exit 1;
+if [ "$dash_echo_test" = "@" ]; then
+	if [ -x "/bin/bash" ]; then
+		bootstrap_sh=${SH:-/bin/bash}
+		bootstrap_sh_set=set
+		echo "Your shell's echo command is not BSD-compatible."
+		echo "Setting shell to /bin/bash"
+	else
+		{ echo "Your shell's echo command is not BSD-compatible."
+		  echo "Please select another shell by setting the environment"
+		  echo "ERROR: variable SH."
+		} 1>&2
+		exit 1;		
+	fi
 fi
 
 if [ -n "$PKG_PATH" ]; then
@@ -1147,14 +1154,6 @@ yes|no)
 	;;
 esac
 
-# On all Debian GNU/kFreeBSD 7, /bin/sh is a symlink to /bin/dash, and
-# use /bin/bash.
-if [ "$opsys" = "GNUkFreeBSD" -a "$bootstrap_sh_set" != "set" ]; then
-	echo "TOOLS_PLATFORM.sh?=		/bin/bash	# instead of /bin/sh" >> ${TARGET_MKCONF}
-	echo "TOOLS_PLATFORM.sh?=		/bin/bash	# instead of /bin/sh" >> ${BOOTSTRAP_MKCONF}
-	echo $opsys
-fi
-
 # sbin is used by pkg_install, share/mk by bootstrap-mk-files
 mkdir_p $wrkdir/sbin $wrkdir/share/mk
 mkdir_p_early ${wrkdir}
-- 
2.25.1



Home | Main Index | Thread Index | Old Index