Ensure requested image is not deployed already
This commit is contained in:
parent
f62ce8efc2
commit
ed2ae159b9
1 changed files with 5 additions and 2 deletions
|
@ -217,12 +217,15 @@ deploy () {
|
||||||
# A carriage feed is inserted for some reason, lets remove it
|
# A carriage feed is inserted for some reason, lets remove it
|
||||||
data[2]=${data[2]//[$'\t\r\n']}
|
data[2]=${data[2]//[$'\t\r\n']}
|
||||||
|
|
||||||
|
# Lets ensure the requested image is not already deployed
|
||||||
|
if [[ -e $arkanium_dir/deployments/${data[0]} ]]; then
|
||||||
|
printf "\e[1;33m<!>\e[0m\e[1m ${data[0]} is already deployed, canceling deployment\e[0m\n"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if requested version is already downloaded
|
# Check if requested version is already downloaded
|
||||||
if [[ -e $arkanium_dir/cache/${data[0]}.tar.${data[1]} ]]; then
|
if [[ -e $arkanium_dir/cache/${data[0]}.tar.${data[1]} ]]; then
|
||||||
|
|
||||||
printf "\e[1;34m-->\e[0m\e[1m ${data[0]} already in cache, skipping download\e[0m\n"
|
printf "\e[1;34m-->\e[0m\e[1m ${data[0]} already in cache, skipping download\e[0m\n"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# Download the tarball if not yet downloaded
|
# Download the tarball if not yet downloaded
|
||||||
|
|
Loading…
Add table
Reference in a new issue