Last active
October 4, 2025 22:42
-
-
Save somaholiday/e623e26b338a21844c7fab7830681ccb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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.