-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
34 lines (29 loc) · 944 Bytes
/
install.sh
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
# Install navi
# Install tools
sudo apt update && sudo apt -y upgrade
sudo apt -y install cargo fzf git
cargo install --locked navi
# Config bash
bashrc=~/.bashrc
if [ -f "$bashrc" ];
then
echo '\n### NAVI ###' >> ~/.bashrc
echo 'alias navi="~/.cargo/bin/navi"' >> ~/.bashrc
echo 'eval "$(navi widget bash)"' >> ~/.bashrc
else
echo "$bashrc file does not exist. Skipped."
fi
# Config zsh
zshrc=~/.zshrc
if [ -f "$zshrc" ];
then
echo '\n### NAVI ###' >> ~/.zshrc
echo 'alias navi="~/.cargo/bin/navi"' >> ~/.zshrc
echo 'eval "$(navi widget zsh)"' >> ~/.zshrc
else
echo "$zshrc file does not exist. Skipped."
fi
# get cheatsheet
git clone "https://github.com/FullByte/navi-cheatsheet" "$(navi info cheats-path)/FullByte__navi-cheatsheet"
# add cronjob to update on each boot
(crontab -l 2>/dev/null; echo "@reboot sleep 22 && cd \"$(navi info cheats-path)/FullByte__navi-cheatsheet\" && git pull") | crontab -