File tree Expand file tree Collapse file tree
system_files/shared/usr/share/ublue-os Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,11 +57,7 @@ migrate-status:
5757 set -euo pipefail
5858
5959 MIGRATIONS_DIR ="/usr/share/hypercube/migrations"
60- STATE_DIR ="/var/lib/hypercube/migrations"
61- COMPLETED_FILE ="$STATE_DIR/completed"
62-
63- mkdir -p "$STATE_DIR"
64- touch "$COMPLETED_FILE"
60+ COMPLETED_FILE ="/var/lib/hypercube/migrations/completed"
6561
6662 echo "Hypercube Migrations"
6763 echo "===================="
@@ -73,7 +69,7 @@ migrate-status:
7369 shopt -s nullglob
7470 for migration in "$MIGRATIONS_DIR"/*.sh; do
7571 name =$(basename "$migration")
76- if grep -qxF "$name" "$COMPLETED_FILE" 2>/dev/null; then
72+ if [[ -f "$COMPLETED_FILE" ]] && grep -qxF "$name" "$COMPLETED_FILE" 2>/dev/null; then
7773 echo " [done] $name"
7874 ((completed++)) || true
7975 else
Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ import? "/usr/share/ublue-os/just/60-hypercube.just"
2828import ? " /usr/share/ublue-os/just/61-nvim.just"
2929import ? " /usr/share/ublue-os/just/62-ai.just"
3030import ? " /usr/share/ublue-os/just/63-migrate.just"
31+
You can’t perform that action at this time.
0 commit comments