Skip to content

Commit

Permalink
Merge pull request #1487 from nephros/portable-date-suse
Browse files Browse the repository at this point in the history
Use busybox compatible commands for completion
  • Loading branch information
dmach authored Feb 19, 2024
2 parents 843ff42 + dd712bb commit 6080c5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/osc.complete
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6080c5c

Please sign in to comment.