2025-06-25 16:47:23 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd ~/.local/share/omarchy
|
2025-06-28 11:27:33 -07:00
|
|
|
|
|
|
|
# Remember the version we're at before upgrading
|
|
|
|
last_updated_at=$(git log -1 --format=%cd --date=unix)
|
|
|
|
|
|
|
|
# Get the latest
|
2025-06-25 16:47:23 -07:00
|
|
|
git pull
|
2025-06-28 11:27:33 -07:00
|
|
|
|
|
|
|
# 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
|
2025-06-28 11:39:45 -07:00
|
|
|
echo "Running migration ($migrate_at)"
|
2025-06-28 11:27:33 -07:00
|
|
|
source $file
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Back to where we came from
|
2025-06-25 16:47:23 -07:00
|
|
|
cd -
|