From: Felix Janda Date: Sun, 12 Apr 2015 07:16:28 +0000 (+0200) Subject: lib/configure: Also accept host tuples without vendor string X-Git-Tag: v3.4.0~2 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fpciutils.git;a=commitdiff_plain;h=3c93f3c698c1ff444384b37f90e942243c1a7bbb lib/configure: Also accept host tuples without vendor string Based on patch from https://bugs.gentoo.org/show_bug.cgi?id=425022 --- diff --git a/lib/configure b/lib/configure index 3783f57..7d4cec8 100755 --- a/lib/configure +++ b/lib/configure @@ -44,7 +44,7 @@ if [ -z "$HOST" ] ; then fi [ -n "$RELEASE" ] && rel="${RELEASE}" # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. -host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'` +host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\2/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'` cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo " $host $rel $cpu $sys"