summaryrefslogtreecommitdiff
path: root/fake/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fake/run.sh')
-rwxr-xr-xfake/run.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/fake/run.sh b/fake/run.sh
index 0611e08..a6c8a91 100755
--- a/fake/run.sh
+++ b/fake/run.sh
@@ -1,7 +1,22 @@
#!/bin/bash
-#sleep 960
-#sleep 3600
+naptime=
+while getopts s: flag; do
+ case "${flag}" in
+ s) naptime="${OPTARG}";;
+ *)
+ echo "Bad arg" 1>&2
+ exit 1
+ ;;
+ esac
+done
+if test x"${naptime:-}" != x; then
+ if test -w /dev/console; then
+ console=/dev/console
+ fi
+ echo "fakebench sleeping for ${naptime} seconds" | tee /dev/stdout ${console}
+ sleep ${naptime}
+fi
echo "Ran a benchmark"
echo "Some stderr" 1>&2
mkdir -p fakeresults