mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 12:19:24 +00:00
Add migration system and fix bluetooth service + missing bat
This commit is contained in:
@ -1,5 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd ~/.local/share/omarchy
|
cd ~/.local/share/omarchy
|
||||||
|
|
||||||
|
# Remember the version we're at before upgrading
|
||||||
|
last_updated_at=$(git log -1 --format=%cd --date=unix)
|
||||||
|
|
||||||
|
# Get the latest
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
# Run any pending migrations
|
||||||
|
for file in migrations/*.sh; do
|
||||||
|
filename=$(basename "$file")
|
||||||
|
migrate_at="${filename%.sh}"
|
||||||
|
|
||||||
|
if [ $migrate_at -gt $last_updated_at ]; then
|
||||||
|
echo "Running migration ($migrate_at)"
|
||||||
|
source $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Back to where we came from
|
||||||
cd -
|
cd -
|
||||||
|
8
migrations/1751134568.sh
Normal file
8
migrations/1751134568.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Turn on bluetooth service so blueberry works out the box
|
||||||
|
if systemctl is-enabled --quiet bluetooth.service && systemctl is-active --quiet bluetooth.service; then
|
||||||
|
# Bluetooth is already enabled, nothing to change
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "Let's turn on Bluetooth service so the controls work"
|
||||||
|
sudo systemctl enable --now bluetooth.service
|
||||||
|
fi
|
3
migrations/1751135253.sh
Normal file
3
migrations/1751135253.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Add missing installation of bat
|
||||||
|
echo "Add missing installation of bat (used by the ff alias)"
|
||||||
|
yay -S --noconfirm --needed bat
|
Reference in New Issue
Block a user