-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
38 lines (31 loc) · 1.02 KB
/
init.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
#!/bin/bash
# Update System
sudo zypper update -y
# Install Zypper Packages
sudo zypper install -y $(< packages.list)
# Initialize GIT
# Check if we have an existing .gitconfig file
if ! test -f ~/.gitconfig; then
git config --global user.name "Robert Moses"
git config --global user.email "[email protected]"
git config --global core.sshCommand "/mnt/c/Windows/System32/OpenSSH/ssh.exe"
git config --global commit.gpgsign true
git config --global gpg.format ssh
git config --global gpg.ssh.program "/mnt/c/Users/${USER}/AppData/Local/1Password/app/8/op-ssh-sign-wsl"
echo "Signing Key?:"
read signingKey
git config --global user.signingkey "${signingKey}"
fi
# Initialize Additional Packages in Scripts Folder
for filename in ./scripts/*.sh; do
sh ${filename}
done
# Copy Conf Files
if test -f /etc/wsl.conf; then
sudo rm /etc/wsl.conf
fi
sudo cp ./conf_files/wsl.conf /etc/wsl.conf
# Set git url to propper SSH url
git remote set-url origin [email protected]:robbymoses/wsl_config.git
# Shutdown WSL
wsl.exe --shutdown