1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-05 11:30:41 -07:00
moth/bin/award
2017-02-05 16:42:41 -07:00

16 lines
296 B
Bash
Executable file

#! /bin/sh
if [ $# -lt 3 ] || [ $# -gt 4 ]; then
echo "Usage: $0 TEAM CATEGORY POINTS [COMMENT]"
exit 1
fi
cd $(dirname $0)/../state
if grep -q "^[0-9]* $1 $2 $3 $4" points.log; then
echo "Points already awarded"
exit 1
fi
now=$(date +%s)
echo "$now $1 $2 $3 cli:$4" > points.new/$now.$$