diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-16 13:15:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-16 13:15:53 +0200 |
commit | 422afdb14a7a0c141bce59287377bca1b1b34a07 (patch) | |
tree | 3ef6ca52b40bab5b55eaa28f604478cc255337ea /bpkg/pkg-unpack.cxx | |
parent | 236ad71b105365bedf9d28a5606616fb9aed3168 (diff) |
Add --purge|-p option to pkg-{fetch,unpack} commands
Diffstat (limited to 'bpkg/pkg-unpack.cxx')
-rw-r--r-- | bpkg/pkg-unpack.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 8b08674..3192c27 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -24,7 +24,7 @@ using namespace butl; namespace bpkg { static shared_ptr<package> - pkg_unpack (database& db, const dir_path& c, const dir_path& d) + pkg_unpack (database& db, const dir_path& c, const dir_path& d, bool purge) { tracer trace ("pkg_unpack(dir)"); @@ -66,7 +66,7 @@ namespace bpkg optional<path> (), // No archive false, // Don't purge archive. move (ad), - false}); // Don't purge source. + purge}); db.persist (p); t.commit (); @@ -186,7 +186,7 @@ namespace bpkg fail << "package directory argument expected" << info << "run 'bpkg help pkg-unpack' for more information"; - p = pkg_unpack (db, c, dir_path (args.next ())); + p = pkg_unpack (db, c, dir_path (args.next ()), o.purge ()); } else { |