diff options
author | B. Watson <yalhcru@gmail.com> | 2018-06-04 00:37:40 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2018-06-04 00:37:40 -0400 |
commit | 592e52ce9f4a7edc945bb17073af43e8e261509f (patch) | |
tree | bc0eb2be75a05d7008dea72ef608a78ee12983f0 /sbosrcarch | |
parent | 6d11e9a2f24c1df0b17c67c58ed281b61c5d2259 (diff) | |
download | sbostuff-592e52ce9f4a7edc945bb17073af43e8e261509f.tar.gz |
sbosrcarch purge_mode fix, wip
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-x | sbosrcarch | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 { |