aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-06-04 00:37:40 -0400
committerB. Watson <yalhcru@gmail.com>2018-06-04 00:37:40 -0400
commit592e52ce9f4a7edc945bb17073af43e8e261509f (patch)
treebc0eb2be75a05d7008dea72ef608a78ee12983f0
parent6d11e9a2f24c1df0b17c67c58ed281b61c5d2259 (diff)
downloadsbostuff-592e52ce9f4a7edc945bb17073af43e8e261509f.tar.gz
sbosrcarch purge_mode fix, wip
-rwxr-xr-xsbosrcarch9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbosrcarch b/sbosrcarch
index a8387dd..2c4c8ae 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -1295,7 +1295,14 @@ sub purge_pass_2_wanted {
# helper for purge_mode, removes all files in by-md5
# dirs that aren't listed in %keep_md5sums
sub purge_pass_3_wanted {
- print "purge_pass_3_wanted $_\n";
+ s,^\./,,; # remove leading ./
+ return unless -d $_; # not necessarily necessary...
+ my (undef, undef, undef, $md5sum) = split /\//, $_;
+ if($keep_md5sums{$md5sum}) {
+ print "keep md5sum: $md5sum\n";
+ } else {
+ print "rmtree $_\n";
+ }
}
sub rebuild_wanted {