Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alexmarsev/soxr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Sykes <rob@rob-Ideapad-S205.(none)>2013-01-09 23:43:37 +0400
committerRob Sykes <rob@rob-Ideapad-S205.(none)>2013-01-09 23:43:37 +0400
commit31929368a667ca7f8403112078c15f26d2819431 (patch)
tree7ede2a8ca4f060ded0db3b191061781abe303188
parent16a726205db51c5a7f7b10098e7ce2dbbf050b9c (diff)
add installation check scripts
-rwxr-xr-xinst-check12
-rwxr-xr-xinst-check-soxr28
l---------inst-check-soxr-lsr1
3 files changed, 41 insertions, 0 deletions
diff --git a/inst-check b/inst-check
new file mode 100755
index 0000000..a813aea
--- /dev/null
+++ b/inst-check
@@ -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
diff --git a/inst-check-soxr b/inst-check-soxr
new file mode 100755
index 0000000..0975b46
--- /dev/null
+++ b/inst-check-soxr
@@ -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
diff --git a/inst-check-soxr-lsr b/inst-check-soxr-lsr
new file mode 120000
index 0000000..ec971fb
--- /dev/null
+++ b/inst-check-soxr-lsr
@@ -0,0 +1 @@
+inst-check-soxr \ No newline at end of file