Skip to content

Commit 731761c

Browse files
committed
Added installation integrity check to the update-meowrch utility
1 parent 605e820 commit 731761c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

usr/bin/update-meowrch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ error() {
3131

3232
# Get current version
3333
get_current_version() {
34+
local base_dir="/usr/local/share/meowrch/users/$(whoami)"
35+
36+
# Check for incomplete installation
37+
if [[ -f "$base_dir/.installing" ]]; then
38+
error "Previous installation was interrupted"
39+
error "Please complete or reinstall Meowrch before updating"
40+
return 1
41+
fi
42+
43+
# Integrity check
44+
if [[ ! -f "$base_dir/.installed" ]]; then
45+
warn "Installation metadata missing - installation may be corrupted"
46+
fi
47+
3448
if [[ -f "$VERSION_FILE" ]]; then
3549
cat "$VERSION_FILE"
3650
else

0 commit comments

Comments
 (0)