version hooks

This commit is contained in:
Paolo Denti 2024-01-27 08:29:22 -08:00
parent a6ffb3cff8
commit 70857a4a95
6 changed files with 48 additions and 32 deletions

View File

@ -1,15 +0,0 @@
# ------------------------------------------------------
# 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/post-version-hook.sh Executable file
View File

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

View File

@ -1,15 +0,0 @@
# ------------------------------------------------------
# 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

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

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

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

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

View File

@ -38,7 +38,7 @@ source .install/confirm-start.sh
source .install/yay.sh source .install/yay.sh
source .install/backup.sh source .install/backup.sh
source .install/preparation.sh source .install/preparation.sh
source .install/pre-hook.sh source .install/pre-version-hook.sh
source .install/profile.sh source .install/profile.sh
if [[ $profile == *"Hyprland"* ]]; then if [[ $profile == *"Hyprland"* ]]; then
source .install/hyprland-version.sh source .install/hyprland-version.sh
@ -66,6 +66,7 @@ source .install/restore.sh
source .install/vm.sh source .install/vm.sh
source .install/keyboard.sh source .install/keyboard.sh
source .install/hook.sh source .install/hook.sh
source .install/version-hook.sh
source .install/copy.sh source .install/copy.sh
source .install/config-folder.sh source .install/config-folder.sh
source .install/init-pywal.sh source .install/init-pywal.sh
@ -79,5 +80,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/post-version-hook.sh
source .install/done.sh source .install/done.sh