add installation check scripts

master
Rob Sykes 2013-01-09 19:43:37 +00:00
parent 16a726205d
commit 31929368a6
3 changed files with 41 additions and 0 deletions

12
inst-check 100755
View File

@ -0,0 +1,12 @@
#!/bin/sh
# SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net
# Licence for this file: LGPL v2.1 See LICENCE for details.
# Sanity-check of library installed on unix-like system
# Where are the example source files:
src=$1
test x$src = x && src=/usr/local/share/doc/libsoxr/examples
dir="$(dirname $(readlink -f $0))"
$dir/inst-check-soxr $src && $dir/inst-check-soxr-lsr $src

28
inst-check-soxr 100755
View File

@ -0,0 +1,28 @@
#!/bin/sh
# SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net
# Licence for this file: LGPL v2.1 See LICENCE for details.
# Sanity-check of library installed on unix-like system
dir="$(dirname $(readlink -f $0))"
# Find the examples:
src="$1"
test x"$src" = x && src="$dir/examples"
cd $src
# Somewhere to put the binaries:
tmp=`mktemp -d`
# Build the examples:
if [ `basename $0` = inst-check-soxr ]; then
for f in ?-*.[cC]; do cc -I"$dir/src" $f -lsoxr -o $tmp/$f.out || exit 1; done
else
for f in ?a-*.[cC]; do cc -I"$dir/src" $f -lsoxr-lsr -o $tmp/$f.out || exit 1; done
fi
# Run one example:
$tmp/1*out > /dev/null || exit 1
# Tidy up:
rm -rf $tmp

View File

@ -0,0 +1 @@
inst-check-soxr