summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-06-12 16:13:11 +0100
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-06-13 20:24:15 +0000
commitfa73abe4c13a081eed45ae9a4eb6fa2864a73e3c (patch)
tree83e12bb052073d0beaa7e86115d75fbf090cc605 /contrib
parentba018efe414f282d22d7ab15a092f483044de502 (diff)
downloadbuildstream-fa73abe4c13a081eed45ae9a4eb6fa2864a73e3c.tar.gz
contrib/bst-here: Remove redundant create_volume_if_not_exists() method
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.)
Diffstat (limited to 'contrib')
-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\]> "