-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.sh
executable file
·71 lines (63 loc) · 1.36 KB
/
check.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
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
#!/usr/bin/env bash
_check_cmds() {
local check_must_install=(
tmux
nvim
go
node
npm
yarn
cargo # for rust pkgs
rg # grep alternative
fzf # fuzzy finder
bat # cat alternative
shellcheck # lint shell scripts
nvm # for node version mgmt
)
local check_nice_to_have=(
pyenv # manage different python versions
goimports # automate importing pkgs for golang
prettier # format html,js,json etc
eslint # lint js
shfmt # format shell scripts
exa # ls alternative
procs # ps alternative
tldr # for cheatsheets, use rust-based
duf # alternative to df
gping # alternative to ping
entr # run command when file changes
)
local installed=()
local must_install=()
local nice_to_have=()
for cmd in ${check_must_install[*]}; do
if command -v $cmd &>/dev/null; then
installed+=("$cmd")
else
must_install+=("$cmd")
fi
done
for cmd in ${check_nice_to_have[*]}; do
if command -v $cmd &>/dev/null; then
installed+=("$cmd")
else
nice_to_have+=("$cmd")
fi
done
echo "installed:"
for cmd in ${installed[*]}; do
echo -e "\t$cmd"
done
echo -e "\n"
echo "nice to have:"
for cmd in ${nice_to_have[*]}; do
echo -e "\t$cmd"
done
echo -e "\n"
echo "must install:"
for cmd in ${must_install[*]}; do
echo -e "\t$cmd"
done
echo -e "\n"
}
_check_cmds