aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/wsl.install
blob: ce8d745cc2cb3137b45438d04da0f479513c0b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

mkln ./ssh/config ~/win/.ssh/config
mkln ./gitconfig ~/win/.gitconfig
mkln ./gnupg/gpg.conf ~/win/AppData/Roaming/gnupg/gpg.conf
mkln ./gnupg/gpg-agent.conf ~/win/AppData/Roaming/gnupg/gpg-agent.conf
mkln ./gnupg/scdaemon.conf ~/win/AppData/Roaming/gnupg/scdaemon.conf

mkln() {
    source=$(wslpath -w $1)
    target=$(wslpath -w $(dirname $2))\\$(basename $2)
    cmd.exe /c "mklink $target $source"
}

echo 'In order to use gpg with git for windows, you need to run'
echo ''
echo "\tgit.exe config --system gpg.program 'C:\\Program Files (x86)\\GnuPG\\bin\\gpg.exe'"
echo ''
echo "from an admin terminal"