aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-verify
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-15 10:58:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-15 10:58:17 +0200
commit333c5953151d6324d83d279a7ac3c53cd1af54b9 (patch)
treee473c5ca4461afcbdf67d5db42e883a1d76564e9 /bpkg/pkg-verify
parentd05f9f046565f2d0d4135912103f96f0e66b454f (diff)
Implement pkg-verify, pkg-fetch commands
Diffstat (limited to 'bpkg/pkg-verify')
-rw-r--r--bpkg/pkg-verify27
1 files changed, 27 insertions, 0 deletions
diff --git a/bpkg/pkg-verify b/bpkg/pkg-verify
new file mode 100644
index 0000000..e002bf3
--- /dev/null
+++ b/bpkg/pkg-verify
@@ -0,0 +1,27 @@
+// file : bpkg/pkg-verify -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BPKG_PKG_VERIFY
+#define BPKG_PKG_VERIFY
+
+#include <bpkg/manifest>
+
+#include <bpkg/types>
+#include <bpkg/pkg-verify-options>
+
+namespace bpkg
+{
+ void
+ pkg_verify (const pkg_verify_options&, cli::scanner& args);
+
+ // Verify archive is a valid package and return its manifest. Throw
+ // failed if invalid or if something goes wrong. If diag is false,
+ // then don't issue diagnostics about the reason why the package is
+ // invalid.
+ //
+ package_manifest
+ pkg_verify (const path& archive, bool diag = true);
+}
+
+#endif // BPKG_PKG_VERIFY