1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +01:00

Merge pull request #1487 from nephros/portable-date-suse

Use busybox compatible commands for completion
This commit is contained in:
Daniel Mach 2024-02-19 10:00:03 +01:00 committed by GitHub
commit 6080c5c795
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,12 +152,12 @@ fi
update_projects_list ()
{
if test -s "${projects}" ; then
typeset -i ctime=$(command date -d "$(command stat -c '%z' ${projects})" +'%s')
typeset -i now=$(command date -d now +'%s')
typeset -i ctime=$(command stat -c '%Z' ${projects})
typeset -i now=$(command date +'%s')
if ((now - ctime > 86400)) ; then
if tmp=$(mktemp ${projects}.XXXXXX) ; then
command ${command} ls / >| $tmp
mv -uf $tmp ${projects}
mv -f $tmp ${projects}
fi
fi
else