Repository navigation
Expand file tree
/
Copy pathinit
More file actions
executable file
·40 lines (27 loc) · 1.45 KB
/
Copy pathinit
File metadata and controls
executable file
·40 lines (27 loc) · 1.45 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
#!/usr/bin/env bash
source functions/config_functions.sh
# Install Linux dependencies
os_status linux-fedora && sudo dnf upgrade && find config/packages/fedora -type f | xargs cat | xargs sudo dnf install -y --comment=environment-init
os_status linux-ubuntu && sudo apt update && sudo apt upgrade -y && find config/packages/ubuntu -type f | xargs cat | xargs sudo apt install -y
# Get Homebrew path
os_status linux && brew="/home/linuxbrew/.linuxbrew/bin/brew" || brew="/opt/homebrew/bin/brew"
# Install Homebrew if not already installed
test -x $brew || bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Initialize Homebrew
eval $($brew shellenv)
# Install Homebrew packages
read_config config/homebrew/.Brewfile | brew bundle --file=-
# Add asdf plugins
cut -d " " -f 1 config/asdf/config/.tool-versions | xargs -n 1 asdf plugin add
# Install asdf programs
(cd config/asdf/config && HOMEBREW_PREFIX=/tmp/disabled asdf install)
# Install Fisher and plugins
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && set fisher_path \$__fish_config_dir/fisher && cat config/fish/config/fish_plugins | fisher install"
# Get fish path
fish=$(command -v fish)
# Add fish to shells if not already present
grep -q $fish /etc/shells || echo $fish | sudo tee -a /etc/shells
# Change shell to fish if not already changed
test $SHELL = $fish || chsh -s $fish
# Push configuration
./push