summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-10-25 18:34:13 +0200
committerH. Peter Anvin <hpa@zytor.com>2017-10-25 18:34:13 +0200
commit2e887e92f96c80c837c3ae92f479af0bb2bccc4c (patch)
treed76969a8034032107cad9c123c3013304b0be781
parent670bba3524352bee73a5850cd8cb53721c7ead48 (diff)
downloadballot-2e887e92f96c80c837c3ae92f479af0bb2bccc4c.tar.gz
ballot-2e887e92f96c80c837c3ae92f479af0bb2bccc4c.tar.xz
ballot-2e887e92f96c80c837c3ae92f479af0bb2bccc4c.zip
score.sh: accept a project name on the command lineelection-tab2017
Take a project name on the command line for consistency with the other tools. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rwxr-xr-xscore.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/score.sh b/score.sh
index c32e002..10aa7f7 100755
--- a/score.sh
+++ b/score.sh
@@ -1,10 +1,17 @@
#!/bin/bash -x
export PATH=$(realpath -s $(dirname "$0"))/bin:"$PATH"
+proj="$1"
+shift
if [ -z "$proj" ]; then
- proj=tab2016
+ proj=test
+fi
+if [ ! -d "$proj" ]; then
+ set +x
+ echo "$0: project directory $proj missing" 1>&2
+ exit 1
fi
sdaps="sdaps $proj"
-if [ -f "$1" ]; then
+if [ $# -ne 0 ]; then
$sdaps add "$@"
fi
$sdaps recognize --identify