1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-04 19:19:36 -07:00
moth/contrib/award

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.$$