]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix codingstyle test to run on FreeBSD.
authorFelipe Gasper <felipe@felipegasper.com>
Wed, 7 Dec 2022 00:34:53 +0000 (19:34 -0500)
committerFelipe Gasper <felipe@felipegasper.com>
Thu, 12 Jan 2023 15:21:32 +0000 (10:21 -0500)
$OSTYPE under FreeBSD is “FreeBSD”, which doesn’t match “*bsd*”.
This updates the test to accommodate that capitalization variance.

test/codingstyle.tpkg/codingstyle.test

index 1bf5d6b2df7ce55f764b642152b9b6b3f0afb859..758ccdf00d648b22a2b16c2f741e17ad00d0e2dd 100644 (file)
@@ -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*)