Seen on powerpc and sparc to fail as:
+++ Can't Determine Endianness
It's caused by missing trailing escape of closing ')' for MSB case.
Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/643406
Package-Manager: Portage-2.3.19, Repoman-2.3.6
endian=`file -L /proc/$$/exe`
-if expr "$endian" : '.* MSB \+executable.*' >&/dev/null
-+if expr "$endian" : '.* MSB \+\(executable\|shared object).*' >&/dev/null
++if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null
then
endian=BE
-elif expr "$endian" : '.* LSB \+executable.*' >&/dev/null