summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-06-12 16:13:11 +0100
committerChandan Singh <csingh43@bloomberg.net>2018-06-12 16:13:11 +0100
commit1b19a6b24797557ac728d6bd74f8558a0ba9bb87 (patch)
tree86194a4bcf2b46c07e4828f76e85b72e2fd1c419
parent794a04c587f26432a0a85defad082b2302a21afc (diff)
downloadbuildstream-chandan/bst-here-fixup-usage.tar.gz
contrib/bst-here: Remove redundant create_volume_if_not_exists() methodchandan/bst-here-fixup-usage
This method doesn't really do anything as this is already the default behavior of `docker volume create` so remove it and always call `docker volume create` directly. This command will always print the name of the volume on STDOUT which is not very interesting so silence that. (If it errors out for some reason, that output will go to STDERR so the user should still be able to see that.)
-rwxr-xr-xcontrib/bst-here9
1 files changed, 1 insertions, 8 deletions
diff --git a/contrib/bst-here b/contrib/bst-here
index a0ea08be0..037788e3a 100755
--- a/contrib/bst-here
+++ b/contrib/bst-here
@@ -86,16 +86,9 @@ done
test "$OPTIND" -gt 1 &&
shift $(( OPTIND - 1 ))
-create_volume_if_not_exists () {
- if ! docker volume inspect "$1" >/dev/null 2>&1
- then
- docker volume create --name "$1"
- fi
-}
-
for vol in buildstream-cache buildstream-config
do
- create_volume_if_not_exists "$vol"
+ docker volume create "$vol" >/dev/null
done
BST_HERE_PS1="\[\033[01;34m\]\w\[\033[00m\]> "