additional hooks

This commit is contained in:
Paolo Denti 2024-01-27 07:59:15 -08:00
parent ab573d476d
commit 1a4b7dd8eb
3 changed files with 33 additions and 1 deletions

15
.install/post-hook.sh Executable file
View File

@ -0,0 +1,15 @@
# ------------------------------------------------------
# Copy dotfiles
# ------------------------------------------------------
if [ -f ~/dotfiles-versions/post-hook.sh ]; then
echo -e "${GREEN}"
figlet "post-Hook"
echo -e "${NONE}"
echo ":: The script has detected a post-hook.sh script."
if gum confirm "Do you want to run the script now?"; then
source ~/dotfiles-versions/post-hook.sh
echo ":: post-hook.sh executed!"
else
echo ":: Execution of post-hook.sh skipped."
fi
fi

15
.install/pre-hook.sh Executable file
View File

@ -0,0 +1,15 @@
# ------------------------------------------------------
# Copy dotfiles
# ------------------------------------------------------
if [ -f ~/dotfiles-versions/pre-hook.sh ]; then
echo -e "${GREEN}"
figlet "pre-Hook"
echo -e "${NONE}"
echo ":: The script has detected a pre-hook.sh script."
if gum confirm "Do you want to run the script now?"; then
source ~/dotfiles-versions/pre-hook.sh
echo ":: pre-hook.sh executed!"
else
echo ":: Execution of pre-hook.sh skipped."
fi
fi

View File

@ -26,7 +26,7 @@ echo -e "${NONE}"
echo "Version: $version" echo "Version: $version"
echo "by Stephan Raabe 2024" echo "by Stephan Raabe 2024"
echo "" echo ""
if [ -d ~/dotfiles ] ;then if [ -d ~/dotfiles ]; then
echo "A ML4W dotfiles installation has been detected." echo "A ML4W dotfiles installation has been detected."
echo "This script will guide you through the update process of the ML4W dotfiles." echo "This script will guide you through the update process of the ML4W dotfiles."
else else
@ -37,6 +37,7 @@ source .install/required.sh
source .install/confirm-start.sh source .install/confirm-start.sh
source .install/yay.sh source .install/yay.sh
source .install/backup.sh source .install/backup.sh
source .install/pre-hook.sh
source .install/preparation.sh source .install/preparation.sh
source .install/profile.sh source .install/profile.sh
if [[ $profile == *"Hyprland"* ]]; then if [[ $profile == *"Hyprland"* ]]; then
@ -78,4 +79,5 @@ source .install/gtk.sh
source .install/bashrc.sh source .install/bashrc.sh
source .install/monitor.sh source .install/monitor.sh
source .install/cleanup.sh source .install/cleanup.sh
source .install/post-hook.sh
source .install/done.sh source .install/done.sh