-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·60 lines (53 loc) · 2.12 KB
/
configure
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
60
#!/bin/bash
# Before run this script install Homebrew and execute `./bundle-install`
#
# NOTE: Make sure you configured SSH keys and the password store.
#
# ```
# chmod 600 ~/.ssh/*
# chmod 644 ~/.ssh/*.pub
# eval "$(ssh-agent -s)"
# ssh-add ~/.ssh/key_file
# ```
source zsh/.config/zsh/.zprofile
# Only create pinentry-mac (if missing) and gpg2 symlinks on macOS
if [ "$OS" = "darwin" ]; then
if [ ! -f /usr/local/bin/pinentry-mac ]; then
sudo ln -ns `which pinentry-mac` /usr/local/bin/pinentry-mac
fi
mkdir -p ~/.bin
ln -nsf $(which gpg) ~/.bin/gpg2
fi
mkdir -p ~/.config/zsh && stow zsh
mkdir -p ~/.config/git && stow git
mkdir -p ~/.config/btdt && stow btdt
mkdir -p ~/.m2 && stow maven
# I need to fix this for Linux
if [ "$OS" = "darwin" ]; then
gpg -k && stow gnupg && keybase pgp pull-private --all
if [ ! $? -eq 0 ]; then
# sometimes import fails
keybase pgp pull-private --all
fi
rm ~/.gnupg/public-keys.d/.\#*
fi
stow vim && vim -c "PlugInstall" -c "q" -c "q"
stow starship
# Configure Java versions with jEvn
mkdir -p ~/.config/jenv/versions
if [ "$OS" = "darwin" ]; then
ln -nsf /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home ~/.config/jenv/versions/AdoptiumTemurin-11
ln -nsf /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home ~/.config/jenv/versions/AdoptiumTemurin-17
ln -nsf /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home ~/.config/jenv/versions/AdoptiumTemurin-21
# These versions are only available for Intel macOS
if [ "$ARCH" = "x86_64" ]; then
ln -nsf /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home ~/.config/jenv/versions/AdoptiumTemurin-1.8
ln -nsf /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home ~/.config/jenv/versions/Apple-1.6
fi
else
ln -nsf /usr/lib/jvm/java-11-temurin ~/.config/jenv/versions/AdoptiumTemurin-11
ln -nsf /usr/lib/jvm/java-17-temurin ~/.config/jenv/versions/AdoptiumTemurin-17
ln -nsf /usr/lib/jvm/java-21-temurin ~/.config/jenv/versions/AdoptiumTemurin-21
fi
# Configure default Java version
echo "AdoptiumTemurin-11" > ~/.config/jenv/version