-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·59 lines (51 loc) · 1.84 KB
/
setup.sh
File metadata and controls
executable file
·59 lines (51 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Dotfiles Setup Script
# Run this on new machines to configure your development environment
set -e
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
info() { echo -e "${GREEN}[✓]${NC} $1"; }
warn() { echo -e "${YELLOW}[!]${NC} $1"; }
echo "==================================="
echo " Dotfiles Setup for ltsch"
echo "==================================="
echo ""
# -----------------------------------------------------------------------------
# Git Configuration
# -----------------------------------------------------------------------------
info "Configuring Git identity..."
git config --global user.name "ltsch"
git config --global user.email "140873092+ltsch@users.noreply.github.com"
# Sensible Git defaults
info "Setting Git defaults..."
git config --global init.defaultBranch main
git config --global pull.rebase false
git config --global core.editor "nano"
git config --global push.autoSetupRemote true
# -----------------------------------------------------------------------------
# GitHub CLI (if available)
# -----------------------------------------------------------------------------
if command -v gh &> /dev/null; then
if ! gh auth status &> /dev/null; then
warn "GitHub CLI installed but not authenticated."
echo " Run: gh auth login"
else
info "GitHub CLI already authenticated"
fi
else
warn "GitHub CLI (gh) not installed. Install with: apt install gh"
fi
# -----------------------------------------------------------------------------
# Summary
# -----------------------------------------------------------------------------
echo ""
echo "==================================="
echo " Setup Complete!"
echo "==================================="
echo ""
echo "Git identity:"
echo " Name: $(git config --global user.name)"
echo " Email: $(git config --global user.email)"
echo ""