diff options
author | Chandan Singh <git@chandansingh.net> | 2018-02-17 01:53:52 +0000 |
---|---|---|
committer | Chandan Singh <git@chandansingh.net> | 2018-02-17 02:09:19 +0000 |
commit | e8de57f975de0d04d9cb9f2f676db55c1b80543c (patch) | |
tree | 6b39ffe49abe9c4208d8a7cd00c60cf136c13457 /contrib | |
parent | 722045dbf335cae02ac203fc810933657b044662 (diff) | |
download | buildstream-e8de57f975de0d04d9cb9f2f676db55c1b80543c.tar.gz |
bst-here: add usage instructions
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/bst-here | 26 |
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 |