-
Notifications
You must be signed in to change notification settings - Fork 61
/
git-ssh-gpg.sh
45 lines (37 loc) · 1.08 KB
/
git-ssh-gpg.sh
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
#!/bin/bash
# Check if Homebrew is installed
if ! command -v brew &> /dev/null; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install Git if not already installed
if ! command -v git &> /dev/null; then
echo "Installing Git..."
brew install git
fi
# Install GPG if not already installed
if ! command -v gpg &> /dev/null; then
echo "Installing GPG..."
brew install gnupg
fi
# Verify installations
echo "Verifying installations..."
# Check Git
if command -v git &> /dev/null; then
echo "Git installed successfully. Version: $(git --version)"
else
echo "Git installation failed."
fi
# Check SSH (comes pre-installed on macOS)
if command -v ssh &> /dev/null; then
echo "SSH is available. Version: $(ssh -V 2>&1)"
else
echo "SSH not found. This is unusual for macOS."
fi
# Check GPG
if command -v gpg &> /dev/null; then
echo "GPG installed successfully. Version: $(gpg --version | head -n 1)"
else
echo "GPG installation failed."
fi
echo "Installation process completed."