Create a dedicated script for deploying software actions

This commit is contained in:
Manuel Thalmann 2024-09-12 23:17:04 +02:00
parent 98c5585d82
commit 3f29764944
3 changed files with 288 additions and 234 deletions
scripts/Common/OS

View file

@ -29,6 +29,14 @@ if [ (id -u) -eq 0 ]
userdel -r "$name"
else
source "$dir/../Software/bash/main.fish"
if not type -q getDeploymentScript
function getDeploymentScript
echo "No deployment script specified! No software will be installed." 1>&2
false
end
end
runHook initialize || true
runHook installDrivers || true
runHook installOS || true
@ -37,7 +45,14 @@ else
source "$dir/users.fish"
end
runHook installSoftware || true
runHook installSoftware || begin
set -l script (getDeploymentScript)
if [ -n "$script" ]
source $script
end
end
runHook initializeConfig || true
runHook postInstall || true