diff --git a/arkdep b/arkdep index 9cb44cb..1153c40 100755 --- a/arkdep +++ b/arkdep @@ -862,6 +862,13 @@ deploy () { # Image deployment finished, allow for interupts again trap 'echo "User interupt received, canceling cleanup step"; exit 4' INT TERM + # Check if there is an update script available + if tar -xf $arkdep_dir/cache/${data[0]}.tar.${data[1]} -C $arkdep_dir/cache/ ./${data[0]}-update.sh 2> /dev/null; then + printf '\e[1;34m-->\e[0m\e[1m Running update script\e[0m\n' + # Run the migration script if provided + (source $arkdep_dir/cache/${data[0]}-update.sh) + fi + # Remove tarball if configured to remove if [[ $remove_tar_after_deployment -eq 1 ]]; then printf '\e[1;34m-->\e[0m\e[1m Removing tarball from cache\e[0m\n' diff --git a/arkdep-build b/arkdep-build index 1afe3c3..5c88fe0 100755 --- a/arkdep-build +++ b/arkdep-build @@ -314,6 +314,13 @@ if [[ $type == 'archlinux' ]]; then # Create dir for storing the images mkdir -p $output_target/$image_name + # Add update script, utilized to perform minor system changes and updates + if [[ -f $variantdir/update.sh ]]; then + printf '\e[1;34m-->\e[0m\e[1m Including update script\e[0m\n' + cp -v $variantdir/update.sh $output_target/$image_name/$image_name-update.sh || + cleanup_and_quit 'Failed copying update script to image' + fi + # Generate package list pacman -Q --root=$workdir > $output_target/$image_name.pkgs