mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-01 04:36:13 +01:00
Use busybox compatible commands for completion
- use portable call to date(1) - use plain stat(1) for ctime - don't use mv -u
This commit is contained in:
parent
0f47ce90c5
commit
dd712bba0e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user