-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·173 lines (145 loc) · 3.87 KB
/
install.sh
File metadata and controls
executable file
·173 lines (145 loc) · 3.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#!/usr/bin/env bash
set -e
PYTHON_PACKAGES=(
pynvim # NVIM dependency unidecode # For vim ultisnips
pipx # Python applicaiton manager
)
install_pip() {
# TODO upgrade flags?
python3 -m pip install --user "${PYTHON_PACKAGES[@]}"
}
# TODO cargo
# - cargo install difftastic
# todo lazygit
PIPX_PACKAGES=(
ensurepath
thefuck
juypyterlab
graphtage # json, xml diffing
docker-compose
bitwarden-pyro # rofi bitwarden
neovim-remote
)
# TODO fix in other install
install_pipx() {
pipx install "${PIPX_PACKAGES[@]}"
}
# TODO have changed to using volta
NPM_PACKAGES=(
@bitwarden/cli
sql-language-server
vscode-html-languageserver-bin
typescript typescript-language-server
vim-language-server
@elm-tooling/elm-language-server
yaml-language-server
vscode-css-languageserver-bin
dockerfile-language-server-nodejs
bash-language-server
purescript-language-server
tldr # tldr for man
)
# setup npm
config_npm() {
if ! command -v nvm &> /dev/null
then
echo "Installing NVM"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
fi
#
# TODO move to stow-node
# mkdir "${HOME}/.npm-packages"
# npm config set prefix "${HOME}/.npm-packages"
}
install_npm() {
npm install -g "${NPM_PACKAGES[@]}"
}
APT_PACKAGES=(
mtpfs # FS for Android usb mounting
wajig # wajig large -> list all installed and size
look # Autocompletion of words. Used with vim. TODO missing?
smbclient # Samba printer client
rofi # Application runner
bat # cat replacement
zsh xsel htop mosh stow
shellcheck
unrar p7zip
gawk silversearcher-ag ripgrep
universal-ctags
colordiff colormake
ranger atool caca-utils highlight libsixel-bin
zathura mupdf
mpv ffmpeg youtube-dl
lnav tig
jq
httpie
exa
)
updates_npm() {
npx npm-check-updates -g
}
install_apt() {
sudo apt install "${APT_PACKAGES[@]}"
}
# TODO Setup snap
SNAP_PACKAGES=(
ncspot # Spotify ncurses client
)
# TODO if cs not installed
COURSIER_PACKAGES=(
mdoc
ammonite
sbt-launcher
)
setup_coursier() {
# Add a manually kept in sync completion folder using
# $DOT_DIR_HOME_OR_WHAT_ICALLEDIT
# https://get-coursier.io/docs/cli-overview.html#zsh-completions
# TODO download tempdir. Only need coursier afterwards
curl -Lo cs https://git.io/coursier-cli-linux && \
chmod +x cs && \
./cs install coursier
}
install_coursier() {
# TODO must be not commands. How to
if (( $+commands[coursier] )); then
setup_coursier
fi
coursier install "${COURSIER_PACKAGES[@]}"
}
upgrade_coursier() {
coursier update
}
setup_generic() {
# Setup snap with desktop links
# TODO er dette synderen for spotify .desktop problemet?
mkdir -p ~/.local/share/applications
ln -s /var/lib/snapd/desktop/applications/ ~/.local/share/applications/snap
# - Check if Hasklig font is installed
# - ["[ ! -d ~/.zim ] && curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh", Installing zim]
# - ["[ ! -d ~/.tmux/plugins/tpm ] && git clone https://github.com/tmux-plugins/tpm ${HOME}/.tmux/plugins/tpm || exit 0", Installing tpm]
# #- [git submodule foreach git pull origin master, Updating submodules to origin master]
}
# Use trick from rofi. Have functions named do_update_npm do_install_npm.
# These are built using input args. if no match then info printout
usage() {
echo "TODO"
}
while [ "$1" != "" ]; do
case $1 in
-in | --install_npm) install_npm
exit
;;
#-f | --file ) shift
# filename=$1
# ;;
#-i | --interactive ) interactive=1
# ;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
done