Files
proxmox/scripts/update-script-references.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

79 lines
2.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# Update references to migrated scripts in documentation and other scripts
# Usage: ./scripts/update-script-references.sh [--dry-run]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$SCRIPT_DIR/lib/logging.sh" 2>/dev/null || true
DRY_RUN="${1:---dry-run}"
log_header "Updating Script References"
# Find all archived scripts
ARCHIVED_VERIFY=$(find "$PROJECT_ROOT/scripts/archive/consolidated/verify" -name "*.sh" 2>/dev/null | xargs -n1 basename)
ARCHIVED_LIST=$(find "$PROJECT_ROOT/scripts/archive/consolidated/list" -name "*.sh" 2>/dev/null | xargs -n1 basename)
ARCHIVED_FIX=$(find "$PROJECT_ROOT/scripts/archive/consolidated/fix" -name "*.sh" 2>/dev/null | xargs -n1 basename)
ARCHIVED_CONFIG=$(find "$PROJECT_ROOT/scripts/archive/consolidated/config" -name "*.sh" 2>/dev/null | xargs -n1 basename)
ARCHIVED_DEPLOY=$(find "$PROJECT_ROOT/scripts/archive/consolidated/deploy" -name "*.sh" 2>/dev/null | xargs -n1 basename)
update_references() {
local script_name="$1"
local framework="$2"
local count=0
# Search in documentation
while IFS= read -r file; do
if grep -q "$script_name" "$file" 2>/dev/null; then
log_info " Found reference in: $file"
count=$((count + 1))
if [ "$DRY_RUN" != "--execute" ]; then
log_warn " DRY RUN: Would update reference to use $framework"
else
# Update reference (basic pattern - can be enhanced)
sed -i "s|$script_name|$framework|g" "$file" 2>/dev/null || true
log_success " Updated reference in: $file"
fi
fi
done < <(find "$PROJECT_ROOT/docs" -type f -name "*.md" 2>/dev/null)
if [ $count -eq 0 ]; then
log_info " No references found for: $script_name"
fi
}
# Update verify script references
log_info "Updating verify script references..."
for script in $ARCHIVED_VERIFY; do
update_references "$script" "verify-all.sh"
done
# Update list script references
log_info "Updating list script references..."
for script in $ARCHIVED_LIST; do
update_references "$script" "list.sh"
done
# Update fix script references
log_info "Updating fix script references..."
for script in $ARCHIVED_FIX; do
update_references "$script" "fix-all.sh"
done
# Update config script references
log_info "Updating config script references..."
for script in $ARCHIVED_CONFIG; do
update_references "$script" "configure.sh"
done
# Update deploy script references
log_info "Updating deploy script references..."
for script in $ARCHIVED_DEPLOY; do
update_references "$script" "deploy.sh"
done
log_success "Reference update complete!"