mirror of https://github.com/dirtbags/moth.git
simplify duplicate line check in pointsd
This commit is contained in:
parent
c40e36c78e
commit
a8e9629259
|
@ -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