From: robertlipe Date: Mon, 22 Dec 2014 19:30:03 +0000 (+0000) Subject: OpenBSD's head doesn't support -c. Avoid in testo. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f741fff739e1a1abac64330d2e7ee3e96fe99a76;p=gpsbabel.git OpenBSD's head doesn't support -c. Avoid in testo. --- diff --git a/gpsbabel/testo b/gpsbabel/testo index 1438c79a5..0060aafb1 100755 --- a/gpsbabel/testo +++ b/gpsbabel/testo @@ -72,7 +72,7 @@ gpsbabel() utf8bomcheck() { if [ ${RUNNINGVALGRIND} -ne 0 ]; then - if [ "$(head -c3 $1)" == $'\xef\xbb\xbf' ]; then + if [ "$(dd if=$1 bs=1 count=3 2>/dev/null)" == $'\xef\xbb\xbf' ]; then echo "ERROR: UTF-8 BOM found in $1" let errorcount=errorcount+1 fi