Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2015 12:52:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 205755] portsnap(8) suggestion: add option that shows last time a snapshot was fetched
Message-ID:  <bug-205755-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205755

            Bug ID: 205755
           Summary: portsnap(8) suggestion: add option that shows last
                    time a snapshot was fetched
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: bkazemi@users.sf.net

Hello,

I have a small script I use to check how long it's been since I've grabbed a
snapshot of the ports tree. I figured others might also like being able to =
get
this information via a flag in portsnap.

Here is how I implemented this:
datethen=3D`cut -f2 -d\| /var/db/portsnap/tag 2>/dev/null`
: ${datethen:?'no tag'}
datenow=3D`date +%s`
datediff=3D`expr $datenow - $datethen`
date -r $datethen
echo "$((datediff / 86400)) day(s) $((datediff / 3600 % 24))"\
     "hour(s) since sync."

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205755-8>