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>
This commit is contained in:
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# Quick backup of important dotfiles
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DOTFILES_DIR="$HOME/dotfiles"
|
||||
BACKUP_DIR="$DOTFILES_DIR/backups"
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
|
||||
# Colors
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
echo -e "${GREEN}Backing up dotfiles...${NC}"
|
||||
|
||||
# Create backup directory
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
# Files to backup
|
||||
files=(
|
||||
"$HOME/.zshrc"
|
||||
"$HOME/.gitconfig"
|
||||
"$HOME/.vimrc"
|
||||
"$HOME/.ssh/config"
|
||||
"$HOME/.config/karabiner/karabiner.json"
|
||||
)
|
||||
|
||||
# Create tarball
|
||||
tar_file="$BACKUP_DIR/dotfiles_backup_${TIMESTAMP}.tar.gz"
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo -e "${YELLOW}Adding: $file${NC}"
|
||||
fi
|
||||
done
|
||||
|
||||
tar -czf "$tar_file" \
|
||||
--exclude="*.log" \
|
||||
--exclude=".git" \
|
||||
"${files[@]}" 2>/dev/null || true
|
||||
|
||||
echo -e "${GREEN}Backup created: $tar_file${NC}"
|
||||
|
||||
# Keep only last 10 backups
|
||||
cd "$BACKUP_DIR"
|
||||
ls -t dotfiles_backup_*.tar.gz | tail -n +11 | xargs -r rm
|
||||
|
||||
echo -e "${GREEN}Done!${NC}"
|
||||
Reference in New Issue
Block a user