diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-13 13:25:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-13 14:08:15 +0200 |
commit | 3cc61ab4a6275428520cb0fb2f18dc3e09aef28a (patch) | |
tree | 98e4de2fc914c3510668d29879de30a483712c40 /bpkg/host-os-release.test.cxx | |
parent | 5bdce34d722233ea81557d02ebe213cc83cf4d7a (diff) |
Move os-release facility to libbutl
Diffstat (limited to 'bpkg/host-os-release.test.cxx')
-rw-r--r-- | bpkg/host-os-release.test.cxx | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/bpkg/host-os-release.test.cxx b/bpkg/host-os-release.test.cxx deleted file mode 100644 index e65c3ca..0000000 --- a/bpkg/host-os-release.test.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// file : bpkg/host-os-release.test.cxx -*- C++ -*- -// license : MIT; see accompanying LICENSE file - -#include <bpkg/host-os-release.hxx> - -#include <bpkg/types.hxx> -#include <bpkg/utility.hxx> - -#include <iostream> - -#undef NDEBUG -#include <cassert> - -using namespace std; - -namespace bpkg -{ - extern os_release - host_os_release_linux (path f = {}); - - int - main (int argc, char* argv[]) - { - assert (argc >= 2); // <host-target-triplet> - - target_triplet host (argv[1]); - - os_release r; - if (host.class_ == "linux") - { - assert (argc == 3); // <host-target-triplet> <file-path> - r = host_os_release_linux (path (argv[2])); - } - else - assert (false); - - cout << r.name_id << '\n'; - for (auto b (r.like_ids.begin ()), i (b); i != r.like_ids.end (); ++i) - cout << (i != b ? "|" : "") << *i; - cout << '\n' - << r.version_id << '\n' - << r.variant_id << '\n' - << r.name << '\n' - << r.version_codename << '\n' - << r.variant << '\n'; - - return 0; - } -} - -int -main (int argc, char* argv[]) -{ - return bpkg::main (argc, argv); -} |