-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·45 lines (36 loc) · 1.3 KB
/
install
File metadata and controls
executable file
·45 lines (36 loc) · 1.3 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
#!/bin/bash -eu
echo "Start Provisioning..."
if ! git config --global user.name 2>&1 > /dev/null; then
echo -n "Your name: "
read GIT_NAME
echo "> git config --global user.name \"$GIT_NAME"\"
git config --global user.name "$GIT_NAME"
fi
if ! git config --global user.email 2>&1 > /dev/null; then
echo -n "Your email: "
read GIT_EMAIL
echo "> git config --global user.email $GIT_EMAIL"
git config --global user.email $GIT_EMAIL
fi
if [ ! -e ~/.ssh/id_rsa.pub ]; then
EMAIL=$(git config --global user.email)
echo "> ssh-keygen -t rsa -b 4096 -C \"$EMAIL\""
# https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
ssh-keygen -t rsa -b 4096 -C "$EMAIL"
cat ~/.ssh/id_rsa.pub | pbcopy
open https://github.com/settings/ssh/new
echo "The public key has been copied to the clipboard."
echo -n "After saving the new key on GitHub, press enter: "
read ENTER
fi
if [ ! -d ~/ghq/github.com/fujikky/macos-provisioning ]; then
git clone git@github.com:fujikky/macos-provisioning.git ~/ghq/github.com/fujikky/macos-provisioning
fi
cd ~/ghq/github.com/fujikky/macos-provisioning
./scripts/install.sh
echo "Finish provisioning!"
if [ $(uname -m) = "arm64" ]; then
/opt/homebrew/bin/fish -l
else
/usr/local/bin/fish -l
fi