aboutsummaryrefslogtreecommitdiff
path: root/bpkg/types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-02-09 15:46:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-09 12:31:18 +0200
commit854c668b5e63e26a9d7a6e55226a0940638e0453 (patch)
tree86b03f5db9d65c925941fc872aaa76d24248e0d3 /bpkg/types.hxx
parenteaebfcff492cf7f707b44a3d28620e786116faf1 (diff)
Add pkg-bindist command (generate binary distribution package)
This commit includes an implementation for Debian and alike.
Diffstat (limited to 'bpkg/types.hxx')
-rw-r--r--bpkg/types.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/bpkg/types.hxx b/bpkg/types.hxx
index 7a7b2c7..80e5a7d 100644
--- a/bpkg/types.hxx
+++ b/bpkg/types.hxx
@@ -88,6 +88,8 @@ namespace bpkg
// <libbutl/path.hxx>
//
using butl::path;
+ using butl::path_name;
+ using butl::path_name_view;
using butl::dir_path;
using butl::basic_path;
using butl::invalid_path;
@@ -233,6 +235,14 @@ namespace std
::butl::path::traits_type::canonicalize (r);
return os << r;
}
+
+ inline ostream&
+ operator<< (ostream& os, const ::butl::path_name_view& v)
+ {
+ assert (!v.empty ());
+
+ return v.name != nullptr && *v.name ? (os << **v.name) : (os << *v.path);
+ }
}
#endif // BPKG_TYPES_HXX