better clean containers

This commit is contained in:
Kay0u 2020-03-21 17:11:39 +01:00
parent b256a91314
commit b45792ef5d
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -10,7 +10,7 @@ trap "exit $SYSTEM_FAILURE_EXIT_CODE" ERR
clean_containers()
{
for image_to_delete in "yunohost-$DEBIAN_VERSION-"{"stable","testing","unstable"}""{,"-tmp"}
for image_to_delete in "yunohost-$DEBIAN_VERSION-$CURRENT_VERSION"{,"-tmp"}
do
if lxc info $image_to_delete &>/dev/null
then
@ -18,7 +18,7 @@ clean_containers()
fi
done
for image_to_delete in "yunohost-$DEBIAN_VERSION-"{"stable","testing","unstable"}"-"{"before-install","before-postinstall","after-postinstall"}
for image_to_delete in "yunohost-$DEBIAN_VERSION-$CURRENT_VERSION-"{"before-install","before-postinstall","after-postinstall"}
do
if lxc image info $image_to_delete &>/dev/null
then