-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·28 lines (26 loc) · 871 Bytes
/
setup.sh
File metadata and controls
executable file
·28 lines (26 loc) · 871 Bytes
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
#!/bin/bash
function symlink_and_bak() {
local src="$1"
local dest="$2"
if [[ -e $dest ]] || [[ -L $dest ]]; then
for ((i=0; ; i++)); do
local backup="${dest}.bak_${i}"
if [[ ! -e $backup ]] && [[ ! -L $backup ]]; then
break;
fi;
done
mv "$dest" "$backup"
fi
ln -s "$src" "$dest"
}
repo_dir=$(dirname $(realpath "$0"))
symlink_and_bak "${repo_dir}/zsh/zdotdir/my_env.zsh" "${HOME}/.zshenv"
mamba_dir="${repo_dir}/micromamba"
if [[ $(uname) == "Darwin" ]] ; then
mamba_url="osx-64"
else
mamba_url="linux-64"
fi
curl -Ls "https://micro.mamba.pm/api/micromamba/${mamba_url}/latest" | tar -xvj -C "$mamba_dir" bin/micromamba
"${mamba_dir}/bin/micromamba" -r "$mamba_dir" create -f "${mamba_dir}/devtools.yaml" -y -c conda-forge
echo Install fonts - Jetbrains Mono Nerd Font from https://www.nerdfonts.com/font-downloads