summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfake/run.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/fake/run.sh b/fake/run.sh
index a6c8a91..5bf7846 100755
--- a/fake/run.sh
+++ b/fake/run.sh
@@ -1,9 +1,11 @@
#!/bin/bash
naptime=
-while getopts s: flag; do
+fail=
+while getopts s:f flag; do
case "${flag}" in
s) naptime="${OPTARG}";;
+ f) fail=1;;
*)
echo "Bad arg" 1>&2
exit 1
@@ -23,3 +25,9 @@ mkdir -p fakeresults
touch fakeresults/fake1
touch fakeresults/fake2
touch extralog
+result=$?
+if test x"${fail:-}" = x; then
+ exit ${result}
+else
+ false
+fi