Files
omarchy/bin/omarchy-update

37 lines
936 B
Plaintext
Raw Normal View History

2025-06-25 16:47:23 -07:00
#!/bin/bash
Omarchy 1.8.0 (#415) * Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit 4c46c2208a57aea9caf6a9eb0ffa282ab8a2c87a. * Revert "Swap Spotify GUI to TUI" This reverts commit b09d2d68cd65167e7cff5f751caed1fa5ac38dba. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
2025-07-30 23:44:27 +02:00
# Exit immediately if a command exits with a non-zero status
set -e
STATE_DIR="$HOME/.local/state/omarchy/migrations"
2025-06-25 16:47:23 -07:00
cd ~/.local/share/omarchy
Omarchy 1.8.0 (#415) * Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit 4c46c2208a57aea9caf6a9eb0ffa282ab8a2c87a. * Revert "Swap Spotify GUI to TUI" This reverts commit b09d2d68cd65167e7cff5f751caed1fa5ac38dba. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
2025-07-30 23:44:27 +02:00
# Create the migrations state directory, we will store an empty file for each migration that has already been performed.
mkdir -p "$STATE_DIR"
# Get the latest while trying to preserve any modifications
git pull --autostash
git diff --check || git reset --merge
# Run any pending migrations
Omarchy 1.8.0 (#415) * Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit 4c46c2208a57aea9caf6a9eb0ffa282ab8a2c87a. * Revert "Swap Spotify GUI to TUI" This reverts commit b09d2d68cd65167e7cff5f751caed1fa5ac38dba. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
2025-07-30 23:44:27 +02:00
for file in migrations/*.sh; do
filename=$(basename "$file")
migrate_at="${filename%.sh}"
Omarchy 1.8.0 (#415) * Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit 4c46c2208a57aea9caf6a9eb0ffa282ab8a2c87a. * Revert "Swap Spotify GUI to TUI" This reverts commit b09d2d68cd65167e7cff5f751caed1fa5ac38dba. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
2025-07-30 23:44:27 +02:00
# Migration already applied, to re-run it simply delete the state file and try again
[ -e "${STATE_DIR}/$filename" ] && continue
echo -e "\e[32m\nRunning migration (${filename%.sh})\e[0m"
source $file
Omarchy 1.8.0 (#415) * Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit 4c46c2208a57aea9caf6a9eb0ffa282ab8a2c87a. * Revert "Swap Spotify GUI to TUI" This reverts commit b09d2d68cd65167e7cff5f751caed1fa5ac38dba. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
2025-07-30 23:44:27 +02:00
touch "${STATE_DIR}/$filename"
done
# Update system packages
echo -e "\e[32m\nUpdate system packages\e[0m"
yay -Syu --noconfirm
2025-07-22 19:09:09 -04:00
# Back to where we came from
cd - >/dev/null
Omarchy 1.8.0 (#415) * Update location of sourced install script * Add OMARCHY_PATH for easy access * Formatting * Enable using finder in walker (#396) * Enable using finder in walker * capitalize name property * Hot reload theme for quick switching * Use fonts from AUR instead of downloading them directly like an animal * Include the common JetBrains substitution * Add a very basic font selector for terminal * Give the new font selector a bit of room to breathe * Swap Spotify GUI to TUI * Correct package name * Add theme update script (#391) * Move updating themes from Updates to theme menu Yeah, it could go in either spot, but since we have one entire category dedicated to themes, lets keep it there. * Revert "Correct package name" This reverts commit 4c46c2208a57aea9caf6a9eb0ffa282ab8a2c87a. * Revert "Swap Spotify GUI to TUI" This reverts commit b09d2d68cd65167e7cff5f751caed1fa5ac38dba. * Added backup timestamps to various omarchy-refresh-* files to prevent clobbering (#402) * Added backup timestamps to omarchy-refresh-[hyprlock|swayosd|walker|waybar] scripts to prevent data loss if ran multiple times * Added new script (omarchy-refresh-config) for refreshing various config files with automated backup creation * update plymouth logo (#406) * Track migrations via state files to avoid running migrations that have already been performed. (#411) * Just use set -e instead of manually checking for return values * Fix migration * Unused * Migrate fonts to packages * No longer needed * Use fd for better performance on walker finder * Add walker config refresh to enable the finder * Dropbox is now an optional setup --------- Co-authored-by: Shigeto Kumagai <shk@all.daynight.jp> Co-authored-by: Mohamedsayhii <63726183+Mohamedsayhii@users.noreply.github.com> Co-authored-by: Ryan Hughes <ryan@heyoodle.com> Co-authored-by: Andy Davis <developer.andy@gmail.com> Co-authored-by: Taha <paprikataha@gmail.com>
2025-07-30 23:44:27 +02:00