-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-wsl-stuff.sh
More file actions
executable file
·36 lines (27 loc) · 1.8 KB
/
install-wsl-stuff.sh
File metadata and controls
executable file
·36 lines (27 loc) · 1.8 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
#!/usr/bin/env bash
# Install stuff for linux home brew - https://docs.brew.sh/Homebrew-on-Linux
sudo apt-get update
sudo apt-get install build-essential curl file git zsh
sudo apt-get install apt-transport-https
sudo apt-get install dotnet-sdk-3.1
sudo apt-get install inotify-tools
sudo apt-get install python3
echo "If there are problems with installing, checkout the troubleshooting on this page"
echo "https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2004#install-the-net-core-sdk"
echo "Installing Deno..."
curl -fsSL https://deno.land/x/install/install.sh | sh
REPO_DIR="$( cd "$( dirname "$(dirname "${BASH_SOURCE[0]}" )" )" && pwd )"
GIT_DIR="$REPO_DIR/git"
ln -nfsv "$GIT_DIR/.pc.gitconfig" ~
echo "Copying 'wsl.conf' into /etc/. Password will be required"
sudo ln -nfsv "$REPO_DIR/wsl/wsl.conf" /etc/
echo "Linking files in Windows to those in the dotfiles repo on the specific WSL distro"
WINDOWS_USER="${WINDOWS_USER:-$USER}"
WSL_OS="${WSL_OS:-$(lsb_release -d | cut -f2 | tr ' ' '-')}"
WSL_USER="${WSL_USER:-$USER}"
echo "Linking alacritty.toml"
cmd.exe /c mklink "C:\\Users\\$WINDOWS_USER\\AppData\\Roaming\\alacritty\\alacritty.toml" "\\\\wsl$\\$WSL_OS\\home\\$WSL_USER\\code\\dotfiles\\wsl\\alacritty.toml"
echo "Linking Windows Terminal settings.json"
cmd.exe /c mklink "C:\\Users\\$WINDOWS_USER\\AppData\\Local\\Packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\LocalState\\settings.json" "\\\\wsl$\\$WSL_OS\\home\\$WSL_USER\\code\\dotfiles\\wsl\\windows-terminal.settings.json"
echo "Linking Windows Terminal Preview settings.json"
cmd.exe /c mklink "C:\\Users\\$WINDOWS_USER\\AppData\\Local\\Packages\\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\\LocalState\\settings.json" "\\\\wsl$\\$WSL_OS\\home\\$WSL_USER\\code\\dotfiles\\wsl\\windows-terminal-preview.settings.json"