Skip to content

Instantly share code, notes, and snippets.

@somaholiday
Last active October 4, 2025 22:42
Show Gist options
  • Save somaholiday/e623e26b338a21844c7fab7830681ccb to your computer and use it in GitHub Desktop.
Save somaholiday/e623e26b338a21844c7fab7830681ccb to your computer and use it in GitHub Desktop.
#!/bin/bash
# Install Homebrew if not present
if ! command -v brew &> /dev/null; then
echo ""
echo "⚘ Installing Homebrew"
echo ""
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)" # Make brew available immediately
fi
# Install gh CLI
if ! command -v gh &> /dev/null; then
echo ""
echo "⚘ Installing gh"
echo ""
brew install gh
fi
# Authenticate
echo ""
echo "⚘ Please authenticate with GitHub..."
echo ""
gh auth login
# Clone private dotfiles
gh repo clone somaholiday/.dotfiles ~/.dotfiles
if [ $? -eq 0 ]; then
echo ""
echo "✅ Now run..."
echo ""
echo "cd ~/.dotfiles"
echo "./bootstrap.sh"
echo ""
else
echo ""
echo "❌ Something went wrong."
echo ""
fi

Comments are disabled for this gist.