Fix if then else statement

The script will always create the box (using packer) even if it already exist.
This commit is contained in:
Abdessamad TEMMAR 2018-12-27 20:34:27 +00:00 committed by GitHub
parent 8e37a8f842
commit 23f264d475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,7 @@ for provider in $providers; do
mkdir -p "$packer_build_path"
if [ -e $packer_build_path/$search_string.box ]; then
echo "It looks like the $provider vagrant box already exists. Skipping the build."
fi
else
echo "Building the Vagrant box for $provider..."
packer_provider="$provider-iso"
if [ $provider = "qemu" ]; then
@ -155,6 +155,7 @@ for provider in $providers; do
echo "Error building the Vagrant boxes using Packer. Please check the output above for any error messages."
exit 1
fi
fi
done
echo "Attempting to add the box to Vagrant..."