mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-07 08:52:54 +01:00
pentoo-update: normalize date format
This commit is contained in:
parent
b6783bd2ea
commit
f15e41be1d
1 changed files with 2 additions and 2 deletions
|
|
@ -188,8 +188,8 @@ safe_exit() {
|
||||||
do_sync() {
|
do_sync() {
|
||||||
|
|
||||||
read -r portage_timestamp < /usr/portage/metadata/timestamp.chk
|
read -r portage_timestamp < /usr/portage/metadata/timestamp.chk
|
||||||
portage_date=`date --date="$portage_timestamp" '+%Y%m%d%H%M'`
|
portage_date=`date --date="$portage_timestamp" '+%Y%m%d%H%M' -u`
|
||||||
minutesDiff=$(( `date '+%Y%m%d%H%M'` - $portage_date ))
|
minutesDiff=$(( `date '+%Y%m%d%H%M' -u` - $portage_date ))
|
||||||
if [ $minutesDiff -lt 60 ]
|
if [ $minutesDiff -lt 60 ]
|
||||||
then
|
then
|
||||||
echo "The last sync was lesser then 1 hour ago, skipping"
|
echo "The last sync was lesser then 1 hour ago, skipping"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue