aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/bash/utility.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/bash/utility.hxx')
-rw-r--r--libbuild2/bash/utility.hxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/libbuild2/bash/utility.hxx b/libbuild2/bash/utility.hxx
new file mode 100644
index 0000000..1f981c2
--- /dev/null
+++ b/libbuild2/bash/utility.hxx
@@ -0,0 +1,27 @@
+// file : libbuild2/bash/utility.hxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef LIBBUILD2_BASH_UTILITY_HXX
+#define LIBBUILD2_BASH_UTILITY_HXX
+
+#include <libbuild2/types.hxx>
+#include <libbuild2/utility.hxx>
+
+namespace build2
+{
+ namespace bash
+ {
+ // Strip the .bash extension from the project name.
+ //
+ // Note that the result may not be a valid project name.
+ //
+ inline string
+ project_base (const project_name& pn)
+ {
+ return pn.base ("bash");
+ }
+ }
+}
+
+#endif // LIBBUILD2_BASH_UTILITY_HXX