mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-06 06:46:14 +01:00
Merge pull request #1487 from nephros/portable-date-suse
Use busybox compatible commands for completion
This commit is contained in:
commit
6080c5c795
@ -152,12 +152,12 @@ fi
|
|||||||
update_projects_list ()
|
update_projects_list ()
|
||||||
{
|
{
|
||||||
if test -s "${projects}" ; then
|
if test -s "${projects}" ; then
|
||||||
typeset -i ctime=$(command date -d "$(command stat -c '%z' ${projects})" +'%s')
|
typeset -i ctime=$(command stat -c '%Z' ${projects})
|
||||||
typeset -i now=$(command date -d now +'%s')
|
typeset -i now=$(command date +'%s')
|
||||||
if ((now - ctime > 86400)) ; then
|
if ((now - ctime > 86400)) ; then
|
||||||
if tmp=$(mktemp ${projects}.XXXXXX) ; then
|
if tmp=$(mktemp ${projects}.XXXXXX) ; then
|
||||||
command ${command} ls / >| $tmp
|
command ${command} ls / >| $tmp
|
||||||
mv -uf $tmp ${projects}
|
mv -f $tmp ${projects}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user