mirror of https://github.com/dirtbags/moth.git
simplify duplicate line check in pointsd
This commit is contained in:
parent
13424b02b1
commit
af5a377b50
|
@ -11,7 +11,7 @@ BACKUP=$WWW/backup.png
|
||||||
SCOREBOARD=$WWW/scoreboard.html
|
SCOREBOARD=$WWW/scoreboard.html
|
||||||
|
|
||||||
# Only do this if this score hasn't yet been recorded
|
# 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
|
cat $fn >> $POINTS
|
||||||
rm $fn
|
rm $fn
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue