From 70857a4a95725648a9e322024522315453a191d0 Mon Sep 17 00:00:00 2001 From: Paolo Denti Date: Sat, 27 Jan 2024 08:29:22 -0800 Subject: [PATCH] version hooks --- .install/post-hook.sh | 15 --------------- .install/post-version-hook.sh | 15 +++++++++++++++ .install/pre-hook.sh | 15 --------------- .install/pre-version-hook.sh | 15 +++++++++++++++ .install/version-hook.sh | 15 +++++++++++++++ install.sh | 5 +++-- 6 files changed, 48 insertions(+), 32 deletions(-) delete mode 100755 .install/post-hook.sh create mode 100755 .install/post-version-hook.sh delete mode 100755 .install/pre-hook.sh create mode 100755 .install/pre-version-hook.sh create mode 100755 .install/version-hook.sh diff --git a/.install/post-hook.sh b/.install/post-hook.sh deleted file mode 100755 index 0c15521..0000000 --- a/.install/post-hook.sh +++ /dev/null @@ -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 diff --git a/.install/post-version-hook.sh b/.install/post-version-hook.sh new file mode 100755 index 0000000..92eedef --- /dev/null +++ b/.install/post-version-hook.sh @@ -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 diff --git a/.install/pre-hook.sh b/.install/pre-hook.sh deleted file mode 100755 index 0e742ca..0000000 --- a/.install/pre-hook.sh +++ /dev/null @@ -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 diff --git a/.install/pre-version-hook.sh b/.install/pre-version-hook.sh new file mode 100755 index 0000000..4277cab --- /dev/null +++ b/.install/pre-version-hook.sh @@ -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 diff --git a/.install/version-hook.sh b/.install/version-hook.sh new file mode 100755 index 0000000..e28175a --- /dev/null +++ b/.install/version-hook.sh @@ -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 diff --git a/install.sh b/install.sh index abad89c..1de16f5 100755 --- a/install.sh +++ b/install.sh @@ -38,7 +38,7 @@ source .install/confirm-start.sh source .install/yay.sh source .install/backup.sh source .install/preparation.sh -source .install/pre-hook.sh +source .install/pre-version-hook.sh source .install/profile.sh if [[ $profile == *"Hyprland"* ]]; then source .install/hyprland-version.sh @@ -66,6 +66,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 @@ -79,5 +80,5 @@ source .install/gtk.sh source .install/bashrc.sh source .install/monitor.sh source .install/cleanup.sh -source .install/post-hook.sh +source .install/post-version-hook.sh source .install/done.sh