mirror of
https://github.com/basecamp/omarchy.git
synced 2025-08-03 07:19:22 +00:00
26 lines
725 B
Bash
Executable File
26 lines
725 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit immediately if a command exits with a non-zero status
|
|
set -e
|
|
|
|
# Show logo
|
|
clear
|
|
cat <~/.local/share/omarchy/logo.txt
|
|
|
|
# Get the latest while trying to preserve any modifications
|
|
omarchy_path=~/.local/share/omarchy
|
|
git -C $omarchy_path pull --autostash
|
|
git -C $omarchy_path diff --check || git -C $omarchy_path reset --merge
|
|
|
|
# Run migrations
|
|
"$HOME/.local/share/omarchy/bin/omarchy-migrate"
|
|
|
|
# Update system packages
|
|
echo -e "\e[32m\nUpdate system packages\e[0m"
|
|
yay -Syu --noconfirm
|
|
|
|
# Offer to reboot if the kernel has been changed
|
|
if [ "$(uname -r | sed 's/-arch/\.arch/')" != "$(pacman -Q linux | awk '{print $2}')" ]; then
|
|
gum confirm "Linux kernel has been updated. Reboot?" && sudo reboot now
|
|
fi
|