-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.install.zsh
More file actions
74 lines (58 loc) · 1.86 KB
/
.install.zsh
File metadata and controls
74 lines (58 loc) · 1.86 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
#!/bin/zsh
if [[ ${DEBUG_ZSH} ]]; then
echo "[$(date +%H:%M:%S.%3N)] Loading install dotfile configuration..."
fi
function install_plugins(){
# Get OS name
CURRENT_OS=`uname`
install_eget
eget gsamokovarov/jump
eget junegunn/fzf
# OS specific plugins
if [[ $CURRENT_OS == 'Darwin' ]]; then
install_macos
elif [[ $CURRENT_OS == 'Linux' ]]; then
DISTRO=$(bash -c 'cat /etc/*-release | grep -a ^ID=')
if [[ $DISTRO == *'ubuntu'* || $DISTRO == *'debian'* || $DISTRO == *'raspbian'* ]]; then
install_debian
fi
if [[ $DISTRO == *'arch'* || $DISTRO == *'manjaro'* ]]; then
install_arch
fi
fi
if [[ -d "${ZDOTDIR:-$HOME}/.antidote" ]]; then
echo "Antidote is already installed."
else
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
fi
install-release config --path ~/.local/bin
# ZSH= sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
if grep -Fxq "source ~/dotfiles/.dotfile" ~/.zshrc
then
# code if found
else
echo "source ~/dotfiles/.dotfile" >> ~/.zshrc
fi
}
function install_eget(){
mkdir -p ~/.local/bin
curl https://zyedidia.github.io/eget.sh | sh
mv eget ~/.local/bin/eget
}
function install_macos(){
brew install pipx python-setuptools
pipx install install-release
}
function install_debian(){
sudo apt install -y curl python3-pip pipx
sudo apt update
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions with --global argument
eget Rishang/install-release
}
function install_arch(){
sudo pacman -S python-pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions with --global argument
eget Rishang/install-release
}