diff --git a/.install/post-version-hook.sh b/.install/post-version-hook.sh new file mode 100755 index 0000000..5419879 --- /dev/null +++ b/.install/post-version-hook.sh @@ -0,0 +1,15 @@ +# ------------------------------------------------------ +# Copy dotfiles +# ------------------------------------------------------ +if [ -f ~/dotfiles-versions/$version/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/$version/post-version-hook.sh + echo ":: post-version-hook.sh executed!" + else + echo ":: Execution of post-version-hook.sh skipped." + fi +fi diff --git a/.install/pre-version-hook.sh b/.install/pre-version-hook.sh new file mode 100755 index 0000000..13a8f74 --- /dev/null +++ b/.install/pre-version-hook.sh @@ -0,0 +1,15 @@ +# ------------------------------------------------------ +# Copy dotfiles +# ------------------------------------------------------ +if [ -f ~/dotfiles-versions/$version/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/$version/pre-version-hook.sh + echo ":: pre-version-hook.sh executed!" + else + echo ":: Execution of pre-version-hook.sh skipped." + fi +fi diff --git a/.install/version-hook.sh b/.install/version-hook.sh new file mode 100755 index 0000000..963c72e --- /dev/null +++ b/.install/version-hook.sh @@ -0,0 +1,15 @@ +# ------------------------------------------------------ +# Copy dotfiles +# ------------------------------------------------------ +if [ -f ~/dotfiles-versions/$version/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/version-hook.sh + echo ":: version-hook.sh executed!" + else + echo ":: Execution of version-hook.sh skipped." + fi +fi diff --git a/install.sh b/install.sh index 2141958..bc61cb0 100755 --- a/install.sh +++ b/install.sh @@ -26,7 +26,7 @@ echo -e "${NONE}" echo "Version: $version" echo "by Stephan Raabe 2024" echo "" -if [ -d ~/dotfiles ] ;then +if [ -d ~/dotfiles ]; then echo "A ML4W dotfiles installation has been detected." echo "This script will guide you through the update process of the ML4W dotfiles." else @@ -38,6 +38,7 @@ source .install/confirm-start.sh source .install/yay.sh source .install/backup.sh source .install/preparation.sh +source .install/pre-version-hook.sh source .install/profile.sh source .install/installer.sh source .install/general.sh @@ -62,6 +63,7 @@ source .install/restore.sh source .install/vm.sh source .install/keyboard.sh source .install/hook.sh +source .install/version-hook.sh source .install/copy.sh source .install/config-folder.sh source .install/init-pywal.sh @@ -75,4 +77,5 @@ source .install/gtk.sh source .install/bashrc.sh source .install/monitor.sh source .install/cleanup.sh +source .install/post-version-hook.sh source .install/done.sh