From e9080c99622c6ee0a61e332de0457fa423c877e3 Mon Sep 17 00:00:00 2001 From: Dennis ten Hoove Date: Wed, 21 Feb 2024 11:33:09 +0100 Subject: [PATCH] Add support for custom scripts --- arkdep-build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arkdep-build b/arkdep-build index a9b2d5a..2636c7e 100755 --- a/arkdep-build +++ b/arkdep-build @@ -131,6 +131,12 @@ if [[ $type == 'archlinux' ]]; then cp -rv $configs_dir/$variant/overlay/* $workdir/ fi + # Run post-bootstrap script if exists + if [[ -f $configs_dir/$variant/scripts/post-bootstrap.sh ]]; then + printf '\e[1;34m-->\e[0m\e[1m Running post-boostrap script\e[0m\n' + source $configs_dir/$variant/scripts/post-bootstrap.sh + fi + # Read package list and install secondary system components, skip if not used if [[ -e $configs_dir/$variant/package.list ]]; then printf '\e[1;34m-->\e[0m\e[1m Installing secondary packages\e[0m\n' @@ -138,6 +144,12 @@ if [[ $type == 'archlinux' ]]; then arch-chroot $workdir pacman -S --noconfirm ${packages[*]} || cleanup_and_quit 'Failed to install base packages' fi + # Run post-install script if exists + if [[ -f $configs_dir/$variant/scripts/post-install.sh ]]; then + printf '\e[1;34m-->\e[0m\e[1m Running post-install script\e[0m\n' + source $configs_dir/$variant/scripts/post-install.sh + fi + # Clear pacman cache printf '\e[1;34m-->\e[0m\e[1m Clearing pacman cache\e[0m\n' arch-chroot $workdir pacman -Scc <<< Y <<< Y