Rename hooks

This commit is contained in:
Manuel Thalmann 2024-11-03 22:36:30 +01:00
parent b09d7cb390
commit 6f8d13f72a
2 changed files with 5 additions and 5 deletions

View file

@ -66,14 +66,14 @@ function runSetup
cp -r "$nixPkgsDir" "$mountDir/$nixPkgsDir" cp -r "$nixPkgsDir" "$mountDir/$nixPkgsDir"
end end
function prepareAction function actionInitialization
echo "Partitioning drives..." echo "Partitioning drives..."
and getOSConfig partition.script >"$script" and getOSConfig partition.script >"$script"
and "$script" and "$script"
and rm "$script" and rm "$script"
end end
function postAction function actionPostRun
echo "Setup finished!" echo "Setup finished!"
and echo "This machine will reboot in 5 seconds..." and echo "This machine will reboot in 5 seconds..."
and echo "Press CTRL-C to abort..." and echo "Press CTRL-C to abort..."

View file

@ -14,14 +14,14 @@ function runAction -V dir
set -x CONFIG_NAME "$config" set -x CONFIG_NAME "$config"
end end
and runHook prepareAction || true and runHook actionInitialization || true
echo "Flagging repository as safe..." echo "Flagging repository as safe..."
sudo git config --system --add safe.directory (realpath "$(status dirname)/../..") sudo git config --system --add safe.directory (realpath "$(status dirname)/../..")
and runHook preAction || true and runHook actionPreRun || true
$argv $argv
and runHook postAction || true and runHook actionPostRun || true
sudo git config remove-section --system safe || true sudo git config remove-section --system safe || true
end end