[arkdep] Do cleanup on migration and update scripts
This commit is contained in:
parent
3e8cd37e67
commit
b3b541fde1
1 changed files with 8 additions and 3 deletions
11
arkdep
11
arkdep
|
@ -916,9 +916,11 @@ deploy () {
|
||||||
# Run the migration script if provided
|
# Run the migration script if provided
|
||||||
(source $arkdep_dir/cache/${data[0]}-migration.sh)
|
(source $arkdep_dir/cache/${data[0]}-migration.sh)
|
||||||
|
|
||||||
# TODO: Evaluate if this is how we would really like to do this
|
# It is assumed that the migration script will do its own cleanup on migration related files
|
||||||
#
|
|
||||||
# Cancel the update once migration is finished, we are assuming the migration script did all the work for us
|
printf '\e[1;34m-->\e[0m\e[1m Removing migration script\e[0m\n'
|
||||||
|
rm $arkdep_dir/cache/${data[0]}-migration.sh
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1102,6 +1104,9 @@ deploy () {
|
||||||
printf '\e[1;34m-->\e[0m\e[1m Running update script\e[0m\n'
|
printf '\e[1;34m-->\e[0m\e[1m Running update script\e[0m\n'
|
||||||
# Run the migration script if provided
|
# Run the migration script if provided
|
||||||
(source $arkdep_dir/cache/${data[0]}-update.sh)
|
(source $arkdep_dir/cache/${data[0]}-update.sh)
|
||||||
|
|
||||||
|
printf '\e[1;34m-->\e[0m\e[1m Removing update script\e[0m\n'
|
||||||
|
rm $arkdep_dir/cache/${data[0]}-update.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get list of all tarballs in cache
|
# Get list of all tarballs in cache
|
||||||
|
|
Loading…
Add table
Reference in a new issue