diff options
Diffstat (limited to 'util/wsl_install.sh')
| -rwxr-xr-x | util/wsl_install.sh | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/util/wsl_install.sh b/util/wsl_install.sh deleted file mode 100755 index 8ed177ca3..000000000 --- a/util/wsl_install.sh +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | util_dir=$(dirname "$0") | ||
| 4 | dir=$(cd -P -- "$util_dir" && pwd -P) | ||
| 5 | pushd "$dir"; | ||
| 6 | |||
| 7 | if [[ $dir != /mnt/* ]]; | ||
| 8 | then | ||
| 9 | echo | ||
| 10 | echo "You need to clone the qmk_firmware repository outside the linux filesystem." | ||
| 11 | echo "Otherwise the windows executables can't be run." | ||
| 12 | exit 1 | ||
| 13 | fi | ||
| 14 | |||
| 15 | |||
| 16 | while true; do | ||
| 17 | echo | ||
| 18 | echo "Do you want to install all toolchain dependencies needed for compiling QMK?" | ||
| 19 | echo "If you don't want that, you can install the dependencies manually." | ||
| 20 | read -p "(Y/N) " res | ||
| 21 | case $res in | ||
| 22 | [Yy]* ) ./linux_install.sh; break;; | ||
| 23 | [Nn]* ) break;; | ||
| 24 | * ) echo "Invalid answer";; | ||
| 25 | esac | ||
| 26 | done | ||
| 27 | |||
| 28 | download_dir=wsl_downloaded | ||
| 29 | |||
| 30 | source "$dir/win_shared_install.sh" | ||
| 31 | |||
| 32 | pip3 install -r ${util_dir}/../requirements.txt | ||
| 33 | |||
| 34 | echo | ||
| 35 | echo "Creating a softlink to the utils directory as ~/qmk_utils." | ||
| 36 | echo "This is needed so that the the make system can find all utils it need." | ||
| 37 | read -p "Press enter to continue (ctrl-c to abort)" | ||
| 38 | ln -sfn "$dir" ~/qmk_utils | ||
| 39 | |||
| 40 | if grep "^source ~/qmk_utils/activate_wsl.sh$" ~/.bashrc | ||
| 41 | then | ||
| 42 | echo | ||
| 43 | echo "The line source ~/qmk_utils/activate_wsl.sh is already added to your /.bashrc" | ||
| 44 | echo "Not adding it twice" | ||
| 45 | else | ||
| 46 | while true; do | ||
| 47 | echo | ||
| 48 | echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of your" | ||
| 49 | echo ".bashrc file? Without this make won't find the needed utils, so if you don't" | ||
| 50 | echo "want to do it automatically, then you have to do it manually later." | ||
| 51 | read -p "(Y/N)? " res | ||
| 52 | case $res in | ||
| 53 | [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;; | ||
| 54 | [Nn]* ) break;; | ||
| 55 | * ) echo "Invalid answer";; | ||
| 56 | esac | ||
| 57 | done | ||
| 58 | fi | ||
| 59 | |||
| 60 | while true; do | ||
| 61 | echo | ||
| 62 | echo "Do you want to add a symlink to the QMK repository in your home directory for" | ||
| 63 | echo "convenience? This will create a folder 'qmk_firmware' in your home directory." | ||
| 64 | echo "In the future you can use this folder instead of the full path on your Windows" | ||
| 65 | echo "file system." | ||
| 66 | read -p "(Y/N)? " res | ||
| 67 | case $res in | ||
| 68 | [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;; | ||
| 69 | [Nn]* ) break;; | ||
| 70 | * ) echo "Invalid answer";; | ||
| 71 | esac | ||
| 72 | done | ||
| 73 | |||
| 74 | echo | ||
| 75 | echo "******************************************************************************" | ||
| 76 | echo "Installation completed!" | ||
| 77 | echo "You need to open a new bash command prompt for all the utils to work properly" | ||
| 78 | echo "******************************************************************************" | ||
| 79 | |||
| 80 | popd > /dev/null | ||
