lock util to use mod time instead of created time

This commit is contained in:
q
2017-02-14 22:41:34 +02:00
parent e056fba968
commit d3aaffd619

View File

@@ -62,7 +62,7 @@ _remove() {
exit 1
}
[[ -z "$ARG" ]] && _help && echo "MISSING ARGUMENT" | $BOXES && exit 1
created=$( stat -c %Z "$LOCKFILE" )
created=$( stat -c %Y "$LOCKFILE" )
now=$( date +%s )
age=$(( $now - $created ))
test $ARG -lt $age