Browse Source

fix: Correct syntax errors in restore feature function

- Fixed missing `fi` statements in conditional blocks
- Resolved potential shell script syntax issues in `restore_feature()`
- Ensured proper control flow and error handling in backup restoration logic
pull/231/head v0.0.87
煎饼果子卷鲨鱼辣椒 4 months ago
parent
commit
4407650e67
  1. 4
      scripts/run/cursor_mac_id_modifier.sh

4
scripts/run/cursor_mac_id_modifier.sh

@ -544,7 +544,7 @@ restore_feature() {
if [ ! -e "$BACKUP_DIR"/*.backup_* ]; then if [ ! -e "$BACKUP_DIR"/*.backup_* ]; then
log_warn "未找到任何备份文件" log_warn "未找到任何备份文件"
return return
}
fi
echo echo
log_info "可用的备份文件:" log_info "可用的备份文件:"
@ -569,7 +569,7 @@ restore_feature() {
if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -ge "$i" ]; then if ! [[ "$choice" =~ ^[0-9]+$ ]] || [ "$choice" -ge "$i" ]; then
log_error "无效的选择" log_error "无效的选择"
return return
}
fi
# 获取选择的备份文件 # 获取选择的备份文件
local selected_backup="${backup_files[$((choice-1))]}" local selected_backup="${backup_files[$((choice-1))]}"

Loading…
Cancel
Save