mirror of
https://github.com/dirtbags/moth.git
synced 2025-01-05 03:21:06 -07:00
16 lines
296 B
Bash
Executable file
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.$$
|