Do not remove the Base snapshots on policy 23/131223/1
authorYonghee Han <onstudy@samsung.com>
Fri, 26 May 2017 02:30:57 +0000 (11:30 +0900)
committerYonghee Han <onstudy@samsung.com>
Fri, 26 May 2017 02:31:00 +0000 (11:31 +0900)
find : -not -regex .*-base.*

Change-Id: I553e630832ddf4f1c21e4d9c2d8692b0bfbcf52f

dir-purge-tool.sh

index e5d8f5e..328ea92 100755 (executable)
@@ -6,7 +6,7 @@
 remove_old() {
 path=$1
 maxage=$(($2 * 86400))
-dirlist=`find $path -type d -regextype posix-awk -regex $PURGE_PATTERN`
+dirlist=`find $path -type d -regextype posix-awk -regex $PURGE_PATTERN -not -regex '.*-base.*'
 now=`date +"%s"`
 for dir in $dirlist; do
   dirn=`dirname $dir`