From: Felipe Gasper Date: Wed, 7 Dec 2022 00:34:53 +0000 (-0500) Subject: Fix codingstyle test to run on FreeBSD. X-Git-Tag: release-1.8.4-rc1~14^2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aec4443f3af4077700f8dfff34e72c46583b44e1;p=thirdparty%2Fldns.git Fix codingstyle test to run on FreeBSD. $OSTYPE under FreeBSD is “FreeBSD”, which doesn’t match “*bsd*”. This updates the test to accommodate that capitalization variance. --- diff --git a/test/codingstyle.tpkg/codingstyle.test b/test/codingstyle.tpkg/codingstyle.test index 1bf5d6b2..758ccdf0 100644 --- a/test/codingstyle.tpkg/codingstyle.test +++ b/test/codingstyle.tpkg/codingstyle.test @@ -9,6 +9,8 @@ PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:. L=90 OPT="-ncs -sai -nut -ce -nfca -nlp -ncdb -br -ts08 -i8 -nbad" +LC_OSTYPE=$(echo $OSTYPE | tr 'A-Z' 'a-z') + st=0 for i in ../../*.c; do @@ -23,11 +25,11 @@ for i in ../../*.c; do continue;; esac - case $OSTYPE in + case $LC_OSTYPE in linux*) diff -w -u $i <(cat $i | indent -l$L $OPT) | grep ^--- ;; - *bsd*) + *bsd*) diff -w -u $i <(cat $i | gindent -l$L $OPT)| grep ^--- ;; darwin*)