1#!/bin/sh 2 3if [ ! -d testdata ]; then 4 mkdir testdata 5fi 6 7if [ x"$1" != x"--local" -a ! -f testdata/add.decTest ]; then 8 # The official tests are freely downloadable, but copyrighted. 9 WGET=`which wget` 10 if [ ! -f "$WGET" ]; then 11 printf "\n*** gettests.sh: error: could not find wget. In order to run the tests, \n" 12 printf " download http://speleotrove.com/decimal/dectest.zip and extract the \n" 13 printf " archive into tests/testdata.\n\n" 14 exit 1 15 fi 16 printf "\nGetting official tests ... \n\n" 17 $WGET -nv http://speleotrove.com/decimal/dectest.zip 2>&1 && 18 cd testdata && 19 unzip -qq ../dectest.zip && 20 cd ../ 21fi 22 23if [ ! -f testdata/baseconv.decTest ]; then 24 cp testdata_dist/* testdata 25fi 26