From fa73abe4c13a081eed45ae9a4eb6fa2864a73e3c Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Tue, 12 Jun 2018 16:13:11 +0100 Subject: 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.) --- contrib/bst-here | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'contrib') 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\]> " -- cgit v1.2.1