Skip to content
Snippets Groups Projects
Commit 8acece36 authored by chrfranke's avatar chrfranke
Browse files

Replaced 'head [-n] -1' by 'sed 1...' in autogen.sh to avoid portability issues.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2455 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 127794ac
No related branches found
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.648 2008/01/23 13:43:24 ballen4705 Exp $
$Id: CHANGELOG,v 1.649 2008/01/29 18:36:20 chrfranke Exp $
The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
......@@ -34,6 +34,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] Replaced 'head [-n] -1' by 'sed 1...' in autogen.sh to avoid
portability issues.
[BA] Fixed autogen.sh script so that it uses 'grep -n 1' if 'grep -1'
fails. Needed for Mac OS X 10.4. Uck.
......
#!/bin/sh
# $Id: autogen.sh,v 1.17 2008/01/23 13:43:24 ballen4705 Exp $
# $Id: autogen.sh,v 1.18 2008/01/29 18:36:20 chrfranke Exp $
#
# Generate ./configure from config.in and Makefile.in from Makefile.am.
# This also adds files like missing,depcomp,install-sh to the source
......@@ -68,14 +68,7 @@ case "$AUTOMAKE" in
*automake-1.[78]|*automake17)
;;
*)
# first see if we need 'head -1' or 'head -n 1'
echo hello | head -1 > /dev/null 2> /dev/null
if [ $? ] ; then
ver="`$AUTOMAKE --version | head -n 1 | sed -n 's,^.*\([12]\.[.0-9]*[-pl0-9]*\).*$,\1,p'`"
else
ver="`$AUTOMAKE --version | head -1 | sed -n 's,^.*\([12]\.[.0-9]*[-pl0-9]*\).*$,\1,p'`"
fi
ver="`$AUTOMAKE --version | sed -n '1s,^.*\([12]\.[.0-9]*[-pl0-9]*\).*$,\1,p'`"
ver="${ver:-?.?.?}"
case "$ver" in
1.[78]*|1.9.[1-6]|1.10) ver= ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment