[Bug 205755] portsnap(8) suggestion: add option that shows last time a snapshot was fetched

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 31 12:52:47 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205755

            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 at FreeBSD.org
          Reporter: bkazemi at 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=`cut -f2 -d\| /var/db/portsnap/tag 2>/dev/null`
: ${datethen:?'no tag'}
datenow=`date +%s`
datediff=`expr $datenow - $datethen`
date -r $datethen
echo "$((datediff / 86400)) day(s) $((datediff / 3600 % 24))"\
     "hour(s) since sync."

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


More information about the freebsd-bugs mailing list