#!/bin/bash # scripts/utils.sh - Shared utilities and functions # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color # Logging functions log_info() { echo -e "${BLUE}ℹ️ $1${NC}" } log_success() { echo -e "${GREEN}✅ $1${NC}" } log_warning() { echo -e "${YELLOW}⚠️ $1${NC}" } log_error() { echo -e "${RED}❌ $1${NC}" } # Check if command exists command_exists() { command -v "$1" &> /dev/null } # Check if we're in an interactive shell is_interactive() { [[ $- == *i* ]] }