This repository was archived by the owner on Oct 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·85 lines (69 loc) · 2.22 KB
/
setup.sh
File metadata and controls
executable file
·85 lines (69 loc) · 2.22 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
set -e
export DOTFILES=`dirname "$0"`
export DOTFILES=`readlink -f "$DOTFILES"`
if [ ! -L "$HOME/.dotfiles" ]; then
echo "Creating symlink for dotfiles folder..."
[ -e "$HOME/.dotfiles" ] && rm "$HOME/.dotfiles"
ln -s "$DOTFILES" "$HOME/.dotfiles"
fi
if [ -z "$(which make)" ]; then
sudo apt install make
fi
if [ -z "$(which curl)" ]; then
sudo apt install curl
fi
if [ ! -d "$HOME/.rbenv" ]; then
echo "Installing rbenv..."
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
mkdir -p ~/.rbenv/plugins
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/rbenv/rbenv-vars.git ~/.rbenv/plugins/rbenv-vars
git clone https://github.com/rbenv/rbenv-each.git ~/.rbenv/plugins/rbenv-each
fi
if [ ! -d "$HOME/.asdf" ]; then
echo "Installing asdf..."
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
fi
function link_simple {
if [ ! -L "$HOME/$1" ]; then
echo "Creating $1..."
[ -e "$HOME/$1" ] && rm "$HOME/$1"
ln -s "$DOTFILES/$1" "$HOME/$1"
fi
}
function link_src_dest {
SRC=$1
DEST=$2
if [ ! -L "$DEST" ]; then
echo "Creating $DEST..."
[ -e "$DEST" ] && rm "$DEST"
mkdir -p $(dirname $DEST)
ln -s "$DOTFILES/$SRC" "$DEST"
fi
}
link_simple ".bashrc"
link_simple ".gemrc"
link_simple ".gitattributes"
link_simple ".gitconfig"
link_simple ".gitignore"
link_simple ".vimrc"
link_src_dest "jira-config.yml" "$HOME/.jira.d/config.yml"
link_src_dest "vscode/settings.json" "$HOME/.config/Code/User/settings.json"
link_src_dest "vscode/snippets" "$HOME/.config/Code/User/snippets"
link_src_dest "i3-config" "$HOME/.config/i3/config"
link_src_dest "dunstrc" "$HOME/.config/dunst/dunstrc"
if [ ! -e "$HOME/.git-completion.sh" ]; then
echo "Downloading git completion..."
wget -O "$HOME/.git-completion.sh" https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
fi
if [ -z "$(which starship)" ]; then
echo "Installing starship..."
curl -sS https://starship.rs/install.sh | sh
fi
if [ ! -d "$HOME/.fzf" ]; then
echo "Installing Fuzzyfind..."
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
fi