diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-14 14:36:44 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-16 14:53:54 +0300 |
commit | ed437dbd3483baa3d15d1d86d8f057d9112653b1 (patch) | |
tree | cbf3974e8b1774ccccd818442cf042e501190b09 /bpkg/utility.hxx | |
parent | 80ee886ca0bd3e41434621a056125c92f31b1aea (diff) |
Add support for default options files
Diffstat (limited to 'bpkg/utility.hxx')
-rw-r--r-- | bpkg/utility.hxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bpkg/utility.hxx b/bpkg/utility.hxx index 8bb8fd8..1e82f44 100644 --- a/bpkg/utility.hxx +++ b/bpkg/utility.hxx @@ -88,6 +88,31 @@ namespace bpkg void clean_tmp (bool ignore_errors); + // Path. + // + // Normalize a path. Also make the relative path absolute using the current + // directory. + // + path& + normalize (path&, const char* what); + + inline path + normalize (const path& f, const char* what) + { + path r (f); + return move (normalize (r, what)); + } + + dir_path& + normalize (dir_path&, const char* what); + + inline dir_path + normalize (const dir_path& d, const char* what) + { + dir_path r (d); + return move (normalize (r, what)); + } + // Progress. // extern bool stderr_term; // True if stderr is a terminal. |