From: Peter van Dijk Date: Thu, 16 Aug 2018 19:23:04 +0000 (+0200) Subject: use gsort when available, because sort -V is a GNU extension X-Git-Tag: dnsdist-1.3.3~151^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da25a468e4cc99af89da4730d32ea0ed3b8643a5;p=thirdparty%2Fpdns.git use gsort when available, because sort -V is a GNU extension --- diff --git a/regression-tests/mysqldiff b/regression-tests/mysqldiff index ce8278a4ab..17bfdd6452 100755 --- a/regression-tests/mysqldiff +++ b/regression-tests/mysqldiff @@ -23,10 +23,17 @@ else -e "SELECT r.name, r.type, r.prio, r.content, r.ttl, CONCAT('''', CONCAT(r.ordername, '''')), r.auth FROM domains d JOIN records r ON d.id=r.domain_id WHERE d.name='test.dyndns' AND(r.type != 'SOA' OR r.type IS NULL) ORDER BY r.name, r.type, r.content, r.ttl, r.prio" > ${testsdir}/${testname}/$step fi +if type gsort >/dev/null 2>/dev/null +then + SORT=gsort +else + SORT=sort +fi + if [ ! "$step" == "start" ] then echo -e "$comment\n--- Start: diff $diffto $step ---" - diff ${testsdir}/${testname}/$diffto ${testsdir}/${testname}/$step | sed '/^[0-9a-z,/-]*$/d' | sort -V + diff ${testsdir}/${testname}/$diffto ${testsdir}/${testname}/$step | sed '/^[0-9a-z,/-]*$/d' | $SORT -V if [ ${PIPESTATUS[0]} -eq 0 ] then echo "no difference"