Files
dotfiles/bin/check-app-configs
David F GliddenandClaude 0838f1cf8c Initial commit: Complete macOS dotfiles system
🖖 Features:
- Master 'engage' script for one-command setup
- 120+ CLI tools via Homebrew
- 40+ Applications (casks + MAS apps)
- Complete macOS system configuration
- Security hardening and privacy settings
- Obsidian knowledge vault setup
- Comprehensive backup strategies
- Automated symlink management

Live long and prosper\! 🚀

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 13:17:01 +02:00

71 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# Check for changes in application configurations
set -euo pipefail
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
echo -e "${GREEN}Checking application configuration changes...${NC}\n"
# Function to check if file has changed
check_config() {
local app_name="$1"
local source_path="$2"
local backup_path="$3"
if [ ! -e "$source_path" ]; then
echo -e "${RED}✗ $app_name: Source not found${NC}"
return
fi
if [ ! -e "$backup_path" ]; then
echo -e "${YELLOW}⚠ $app_name: No backup exists${NC}"
return
fi
if diff -q "$source_path" "$backup_path" >/dev/null 2>&1; then
echo -e "${GREEN}✓ $app_name: Up to date${NC}"
else
echo -e "${YELLOW}⚠ $app_name: Has changes${NC}"
fi
}
# Check each application
echo "Checking configurations..."
# NPM
if [ -f ~/.npmrc ] && [ -f ~/dotfiles/.npmrc ]; then
check_config "NPM config" ~/.npmrc ~/dotfiles/.npmrc
fi
# SSH
if [ -f ~/.ssh/config ]; then
echo -e "${YELLOW}! SSH config: Manual check required (contains sensitive data)${NC}"
fi
# LaunchBar
if [ -d "$HOME/Library/Application Support/LaunchBar" ]; then
# Check if backup exists
if [ -d "$HOME/dotfiles/macos-apps/LaunchBar" ]; then
echo -e "${YELLOW}! LaunchBar: Run backup script to check for changes${NC}"
else
echo -e "${YELLOW}⚠ LaunchBar: No backup exists${NC}"
fi
fi
# Hazel
if [ -f "$HOME/Library/Application Support/Hazel/hazelrules.db" ]; then
check_config "Hazel rules" \
"$HOME/Library/Application Support/Hazel/hazelrules.db" \
"$HOME/dotfiles/macos-apps/Hazel/hazelrules.db"
fi
# Git config
check_config "Git config" ~/.gitconfig ~/dotfiles/git/.gitconfig
echo -e "\n${GREEN}Check complete!${NC}"
echo -e "To backup changed configs, run: ${YELLOW}~/dotfiles/macos-apps/backup-app-configs.sh${NC}"