mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Extract the confirmation into its own file
This commit is contained in:
@@ -4,17 +4,7 @@ set -e
|
|||||||
|
|
||||||
trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR
|
trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR
|
||||||
|
|
||||||
gum style --border normal --border-foreground 6 --padding "1 2" \
|
omarchy-update-confirm
|
||||||
"Ready to update Omarchy?" \
|
|
||||||
"" \
|
|
||||||
"• You cannot stop the update once you start!" \
|
|
||||||
"• Make sure you're connected to power or have a full battery"
|
|
||||||
|
|
||||||
if ! gum confirm --default=false "Continue with update?"; then
|
|
||||||
echo "Update cancelled"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
omarchy-snapshot create || [ $? -eq 127 ]
|
omarchy-snapshot create || [ $? -eq 127 ]
|
||||||
omarchy-update-git
|
omarchy-update-git
|
||||||
omarchy-update-perform
|
omarchy-update-perform
|
||||||
|
|||||||
14
bin/omarchy-update-confirm
Executable file
14
bin/omarchy-update-confirm
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
gum style --border normal --border-foreground 6 --padding "1 2" \
|
||||||
|
"Ready to update Omarchy?" \
|
||||||
|
"" \
|
||||||
|
"• You cannot stop the update once you start!" \
|
||||||
|
"• Make sure you're connected to power or have a full battery"
|
||||||
|
|
||||||
|
if ! gum confirm --default=false "Continue with update?"; then
|
||||||
|
echo "Update cancelled"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user