mirror of https://github.com/dirtbags/moth.git
simplify duplicate line check in pointsd
This commit is contained in:
parent
07bcdb95c9
commit
dbad7a6c81
|
@ -11,7 +11,7 @@ BACKUP=$WWW/backup.png
|
|||
SCOREBOARD=$WWW/scoreboard.html
|
||||
|
||||
# Only do this if this score hasn't yet been recorded
|
||||
if ! cut -d' ' -f2- $POINTS | grep -Fqx "$(cut -d' ' -f2- $fn)"; then
|
||||
if [ -z "$(sort -k2 $POINTS $fn | uniq -f1 -d)" ]; then
|
||||
cat $fn >> $POINTS
|
||||
rm $fn
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue