aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-29 13:06:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-29 13:06:08 +0200
commit203067a2742ad2cbb986369b216b1f1ecfb96458 (patch)
treeb3b755ca08aba82a8b780b462dce877afe9d0bea /bpkg/utility
parentf5adc6c0ee7965abcad4cc73d0f36d1ed3cba3cc (diff)
Automatically cleanup package archive, directory on failure
Diffstat (limited to 'bpkg/utility')
-rw-r--r--bpkg/utility5
1 files changed, 5 insertions, 0 deletions
diff --git a/bpkg/utility b/bpkg/utility
index 72e02ba..02d447c 100644
--- a/bpkg/utility
+++ b/bpkg/utility
@@ -9,6 +9,8 @@
#include <utility> // move()
#include <exception> // uncaught_exception ()
+#include <butl/filesystem>
+
#include <bpkg/types>
namespace bpkg
@@ -38,6 +40,9 @@ namespace bpkg
void
rm_r (const dir_path&, bool dir = true);
+ using auto_rm = butl::auto_rmfile;
+ using auto_rm_r = butl::auto_rmdir;
+
// Process.
//
// The process command line is printed for verbosity >= 2 (essential