Add possibility to create volumes implicitly.
This commit is contained in:
parent
17ace3fb33
commit
b9da9c74c4
1 changed files with 6 additions and 2 deletions
|
@ -67,9 +67,13 @@ restore_all() {
|
|||
volume_name="${tarball%.tar}"
|
||||
echo "$volume_name -> $volume"
|
||||
if ! "$DOCKER" volume inspect "$volume_name" 1>&2 2>/dev/null; then
|
||||
if echo "$DVB_CREATE_VOLUME" | grep -Eiq 't|true|1|y|yes'; then
|
||||
"$DOCKER" volume create "$volume_name"
|
||||
else
|
||||
echo "Error: no such volume $volume_name" >&2
|
||||
exit 4
|
||||
fi
|
||||
fi
|
||||
restore "$tarball" "$volume_name"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue