summaryrefslogtreecommitdiffstats
path: root/unixbench/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2009-04-20 10:11:12 +0000
committer Eric Hameleers <alien@slackware.com>2009-04-20 10:11:12 +0000
commit6a5d4dd29936300712a97e88d94aa33079e8e468 (patch)
tree9ce79a3d4a6eff947252091d4f49991e0f4423df /unixbench/build
parentb53b13117e680ed5285439b59d653960c8a25554 (diff)
downloadasb-6a5d4dd29936300712a97e88d94aa33079e8e468.tar.gz
asb-6a5d4dd29936300712a97e88d94aa33079e8e468.tar.xz
Fix the location of the test files
Diffstat (limited to 'unixbench/build')
-rwxr-xr-xunixbench/build/unixbench.SlackBuild23
1 files changed, 16 insertions, 7 deletions
diff --git a/unixbench/build/unixbench.SlackBuild b/unixbench/build/unixbench.SlackBuild
index dc796995..611c49ea 100755
--- a/unixbench/build/unixbench.SlackBuild
+++ b/unixbench/build/unixbench.SlackBuild
@@ -32,6 +32,8 @@
# Changelog:
# 5.1.2-1: 17/Apr/2009 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 5.1.2-2: 20/Apr/2009 by Eric Hameleers <alien@slackware.com>
+# * Fixed the location of the test files.
#
# Run 'sh unixbench.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -44,7 +46,7 @@
PRGNAM=unixbench
VERSION=${VERSION:-5.1.2}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
@@ -157,12 +159,19 @@ cat <<EOT > $PKG/usr/bin/unixbench
export UB_TMPDIR=\$HOME/unixbench/tmp
export UB_TESTDIR=\$HOME/unixbench/testdir
export UB_RESULTDIR=\$HOME/unixbench/results
-mkdir -p \$UB_TMPDIR \$UB_TESTDIR \$UB_RESULTDIR
-cd /usr/lib${LIBDIRSUFFIX}/unixbench
-echo
-read -p "Writing results to \$UB_RESULTDIR ..." -t 3
-echo
-./Run
+if [ "\$1" = "-h" -o "\$1" = "--help" ]; then
+ echo "Run '\$0'" (without arguments) to start the benchmark."
+ echo "The benchmark results will be written to '\$UB_RESULTDIR'"
+ exit 0
+else
+ mkdir -p \$UB_TMPDIR \$UB_TESTDIR \$UB_RESULTDIR
+ cp -p /usr/lib/unixbench/testdir/* \$UB_TESTDIR/
+ cd /usr/lib${LIBDIRSUFFIX}/unixbench
+ echo
+ read -p "Writing results to \$UB_RESULTDIR ..." -t 3
+ echo
+ ./Run
+fi
EOT
chmod 755 $PKG/usr/bin/unixbench