mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Improve update error catching
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [[ $# -lt 1 ]]; then
|
if [[ $# -lt 1 ]]; then
|
||||||
echo "Usage: omarchy-hook [name] [args...]"
|
echo "Usage: omarchy-hook [name] [args...]"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
COMMAND="$1"
|
COMMAND="$1"
|
||||||
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||||
|
|
||||||
@@ -17,7 +19,7 @@ create)
|
|||||||
DESC="$(omarchy-version)"
|
DESC="$(omarchy-version)"
|
||||||
|
|
||||||
echo -e "\e[32mCreate system snapshot\e[0m"
|
echo -e "\e[32mCreate system snapshot\e[0m"
|
||||||
|
|
||||||
# Get existing snapper config names from CSV output
|
# Get existing snapper config names from CSV output
|
||||||
mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}')
|
mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}')
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
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
|
||||||
|
|
||||||
omarchy-snapshot create || [ $? -eq 127 ]
|
omarchy-snapshot create || [ $? -eq 127 ]
|
||||||
omarchy-update-git
|
omarchy-update-git
|
||||||
omarchy-update-perform
|
omarchy-update-perform
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
echo -e "\e[32mUpdate Omarchy\e[0m"
|
echo -e "\e[32mUpdate Omarchy\e[0m"
|
||||||
|
|
||||||
git -C $OMARCHY_PATH pull --autostash
|
git -C $OMARCHY_PATH pull --autostash
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# Used in package emergencies if a bad package has been pushed and we can't revoke.
|
# Used in package emergencies if a bad package has been pushed and we can't revoke.
|
||||||
# Requires manually installing the good package using sudo pacman -U <url>
|
# Requires manually installing the good package using sudo pacman -U <url>
|
||||||
ignored_packages=$(omarchy-pkg-ignored)
|
ignored_packages=$(omarchy-pkg-ignored)
|
||||||
|
|||||||
Reference in New Issue
Block a user