[PC-BSD Commits] r8171 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Wed Dec 8 08:24:36 PST 2010
Author: kris
Date: 2010-12-08 08:24:36 -0800 (Wed, 08 Dec 2010)
New Revision: 8171
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Improved verbosity when doing pruning of old PBIs, and fix check on _keepnum
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2010-12-08 15:53:27 UTC (rev 8170)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2010-12-08 16:24:36 UTC (rev 8171)
@@ -4612,12 +4612,13 @@
mv ${_od}/*.sha256 ${_od}/archived/
# Prune anything beyond the _keepnum
- oCount="0"
- oFiles=`ls -t ${_od}/archived/*.pbi 2>/dev/null`
- for oFile in $oFiles
+ echo "Checking for more than $_keepnum PBIs in archive"
+ oCount="1"
+ for oFile in `ls -t ${_od}/archived/*.pbi 2>/dev/null`
do
if [ -z "$oFile" ] ; then continue ; fi
- if [ $oCount > $_keepnum ] ; then
+ if [ "$oCount" -gt "$_keepnum" ] ; then
+ echo "Removing old PBI ${oFile} from archive"
rm ${oFile}*
fi
oCount=`expr $oCount + 1`
More information about the Commits
mailing list