summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/bst-here26
1 files changed, 25 insertions, 1 deletions
diff --git a/contrib/bst-here b/contrib/bst-here
index b96b36cdc..b8c2dd772 100755
--- a/contrib/bst-here
+++ b/contrib/bst-here
@@ -22,6 +22,25 @@
# This is a helper script for using BuildStream via Docker. See
# docs/source/install.rst for documentation.
+usage() {
+ cat <<EOF
+
+USAGE: $(basename "$0") [-t] [-T] [-h] [COMMAND] [ARG..]
+
+Run a bst command in a new BuildStream contaner.
+
+If no command is specified, an interactive shell is launched
+using "/bin/bash -i".
+
+OPTIONS:
+ -t Force pseudo-terminal allocation.
+ -T Disable pseudo-terminal allocation.
+ -h Print this help text and exit.
+
+EOF
+ exit "$1"
+}
+
is_tty=
if test -t 0
@@ -29,7 +48,7 @@ then
is_tty=y
fi
-while getopts tT arg
+while getopts tTh arg
do
case $arg in
T)
@@ -38,6 +57,11 @@ do
t)
is_tty=y
;;
+ h)
+ usage 0
+ ;;
+ \?)
+ usage 1
esac
done