forked from cowboy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path20_wsl_apt.sh
More file actions
executable file
·43 lines (37 loc) · 958 Bytes
/
Copy path20_wsl_apt.sh
File metadata and controls
executable file
·43 lines (37 loc) · 958 Bytes
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
# WSL-only stuff. Abort if not WSL.
is_wsl || return 1
# Update APT.
e_header "Updating APT"
sudo apt -qq update
# Install APT packages.
packages=(
build-essential
emacs-nox
git-core
jq
tmux
tree
zsh
)
packages=($(setdiff "${packages[*]}" "$(dpkg --get-selections | grep -v deinstall | awk '{print $1}')"))
if (( ${#packages[@]} > 0 )); then
e_header "Installing APT packages: ${packages[*]}"
for package in "${packages[@]}"; do
sudo apt -qq install "$package"
done
fi
# Install Git Extras
if [[ ! "$(type -P git-extras)" ]]; then
e_header "Installing Git Extras"
(
cd $DOTFILES/vendor/git-extras &&
sudo make install
)
fi
# Install BitWarden CLI if not installed
if [[ ! -x "$(command -v n)" ]]; then
echo "Installing BitWarden CLI..."
wget -qO- https://vault.bitwarden.com/download/\?app\=cli\&platform\=linux | busybox unzip -j - -d /tmp
sudo mv /tmp/bw /usr/local/bin
sudo chmod +x /usr/local/bin/bw
fi