#!/bin/bash set -euo pipefail SCRIPT_NAME="convert_dirs.sh" INSTALL_DIR="/usr/local/bin" TARGET_NAME="convert_dirs" # Check script exists if [[ ! -f "$SCRIPT_NAME" ]]; then echo "❌ Error: $SCRIPT_NAME not found in current directory." >&2 exit 1 fi # Copy to install location echo "📦 Installing $SCRIPT_NAME to $INSTALL_DIR/$TARGET_NAME ..." sudo install -m 755 "$SCRIPT_NAME" "$INSTALL_DIR/$TARGET_NAME" echo "✅ Installed successfully." echo "🔧 Run it with: $TARGET_NAME"