wsl_install.sh 919 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
  3. pushd "$dir";
  4. if [[ $dir != /mnt/* ]];
  5. then
  6. echo
  7. echo "You need to clone the qmk_firmware repository outside the linux filesystem."
  8. echo "Otherwise the windows executables can't be run."
  9. exit 1
  10. fi
  11. while true; do
  12. echo
  13. echo "Do you want to install all toolchain dependencies needed for compiling QMK?"
  14. echo "This will run install_dependencies.sh, which calls apt-get upgrade."
  15. echo "If you don't want that, you can install the dependencies manually."
  16. read -p "(Y/N) " res
  17. case $res in
  18. [Yy]* ) sudo ./install_dependencies.sh; break;;
  19. [Nn]* ) break;;
  20. * ) echo "Invalid answer";;
  21. esac
  22. done
  23. echo "Installing dependencies needed for the installation (unzip, wget)"
  24. echo "This will ask for the sudo password"
  25. sudo apt-get install unzip wget
  26. source "$dir/win_shared_install.sh"
  27. popd > /dev/null