From 8da442f411a7fe0d9a5521ac6e95e20c7923caf1 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 17 May 2017 20:27:07 -0400 Subject: update travis script --- util/ergodox_ez.html | 1 - util/travis_compiled_push.sh | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 util/ergodox_ez.html (limited to 'util') diff --git a/util/ergodox_ez.html b/util/ergodox_ez.html deleted file mode 100644 index 8e92866070..0000000000 --- a/util/ergodox_ez.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 58334cb1f6..718daaa295 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -33,18 +33,19 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make ergodox-ez AUTOGEN=true - find . -name ".build" | xargs rm -rf cd .. git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git cd qmk.fm - git submodule update --init --recursive + #git submodule update --init --recursive #rm -rf keyboard #rm -rf keyboards - yes | cp -rf ../qmk_firmware/keyboards . + #yes | cp -rf ../qmk_firmware/keyboards . #mkdir keyboards/ergodox_ez/ - cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html - cp ../qmk_firmware/readme.md qmk_readme.md - ./generate.sh + #cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html + #cp ../qmk_firmware/readme.md qmk_readme.md + #./generate.sh + rm -f _compiled/*.hex + for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done git add -A git commit -m "generated from qmk/qmk_firmware@${rev}" -- cgit v1.2.3 From 28a4e90565f5ea986401dbd69d74a5a4cc16abab Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 12:24:05 +0300 Subject: Download windows flashing utils and driver_installer --- util/wsl_install.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 util/wsl_install.sh (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh new file mode 100644 index 0000000000..87aad77272 --- /dev/null +++ b/util/wsl_install.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +rm -f -r wsl_downloaded +mkdir wsl_downloaded +pushd wsl_downloaded + +echo "Installing dependencies (7z-full, wget)" +echo "This will ask for the sudo password" +sudo apt-get install 7z-full wget + +echo "Installing dfu-programmer" +wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' +7z x -odfu-programmer dfu-programmer-win-0.7.2.zip + +echo "Installing dfu-util" +wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' +7z x dfu-util-0.9-win64.zip + +echo "Installing teensy_loader_cli" +wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' +7z x teensy_loader_cli_windows.zip + +echo "Installing Atmel Flip" +wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' +7z x -oFlip Flip\ Installer\ -\ 3.4.7.112.exe + +echo "Downloading the QMK driver installer" +wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - + +rm -f *.zip +rm Flip\ Installer\ -\ 3.4.7.112.exe +popd + -- cgit v1.2.3 From aa26464480c3080ed935d49cce3f4b9b33c9c05f Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 13:30:53 +0300 Subject: Add checks for cloning to the right dir --- util/wsl_install.sh | 71 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 23 deletions(-) (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 87aad77272..c3aeba6d6e 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -1,33 +1,58 @@ #!/bin/bash -rm -f -r wsl_downloaded -mkdir wsl_downloaded -pushd wsl_downloaded +download_dir = wsl_downloaded -echo "Installing dependencies (7z-full, wget)" -echo "This will ask for the sudo password" -sudo apt-get install 7z-full wget +function install_utils { + rm -f -r $download_dir + mkdir $download_dir + + pushd $download_dir + + echo "Installing dfu-programmer" + wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' + 7z x -odfu-programmer dfu-programmer-win-0.7.2.zip + + echo "Installing dfu-util" + wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' + 7z x dfu-util-0.9-win64.zip + + echo "Installing teensy_loader_cli" + wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' + 7z x teensy_loader_cli_windows.zip + + echo "Installing Atmel Flip" + wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' + 7z x -oFlip Flip\ Installer\ -\ 3.4.7.112.exe -echo "Installing dfu-programmer" -wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' -7z x -odfu-programmer dfu-programmer-win-0.7.2.zip + echo "Downloading the QMK driver installer" + wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - + + rm -f *.zip + rm Flip\ Installer\ -\ 3.4.7.112.exe + + popd > /dev/null +} + +function make_environment { +} + +echo "Installing dependencies (p7zip-full, wget)" +echo "This will ask for the sudo password" +sudo apt-get install p7zip-full wget -echo "Installing dfu-util" -wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' -7z x dfu-util-0.9-win64.zip +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -echo "Installing teensy_loader_cli" -wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' -7z x teensy_loader_cli_windows.zip +if [[ $dir != /mnt/* ]]; +then + echo + echo "You need to clone the qmk_firmware repository outside the linux filesystem." + echo "Otherwise the windows executables can't be run." + exit 1 +fi -echo "Installing Atmel Flip" -wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' -7z x -oFlip Flip\ Installer\ -\ 3.4.7.112.exe +pushd "$dir" -echo "Downloading the QMK driver installer" -wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - +#install_utils -rm -f *.zip -rm Flip\ Installer\ -\ 3.4.7.112.exe -popd +popd > /dev/null -- cgit v1.2.3 From c2096bb5159f3b0d188653cf17cd771725ae7e1a Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 14:42:02 +0300 Subject: Add driver installation --- util/drivers.txt | 46 ++++++++++++++++++++++++++++++++++++++++++++++ util/wsl_install.sh | 25 +++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 util/drivers.txt (limited to 'util') diff --git a/util/drivers.txt b/util/drivers.txt new file mode 100644 index 0000000000..d21a748f0e --- /dev/null +++ b/util/drivers.txt @@ -0,0 +1,46 @@ +# The format is +# driver,desc,vid,pid,guid +# Use a comma as a separator without spaces +# Driver can be one of winusb,libusb,libusbk +# Use Windows Powershell and type [guid]::NewGuid() to generate guids +winusb,Kiibohd DFU Bootloader,1C11,B007,aa5a3f86-b81e-4416-89ad-0c1ea1ed63af +libusb,ATxmega16C4,03EB,2FD8,23266ee7-5423-4cc4-993b-034571c43a90 +libusb,ATxmega32C4,03EB,2FD9,d4b62886-2ac8-4534-aa24-eae0a2c3ce43 +libusb,ATxmega64C3,03EB,2FD6,08467ca7-9b5a-41d2-8d8a-4a26d0b5285b +libusb,ATxmega128C3,03EB,2FD7,1ca69799-6d95-46cf-be69-5b3d0eb915e6 +libusb,ATxmega256C3,03EB,2FDA,216ddc8b-6c67-4cc0-b934-482829a483a0 +libusb,ATxmega384C3,03EB,2FDB,0e4e3347-6025-4d49-ba80-2375ea690c28 +libusb,ATxmega64A1U,03EB,2FE8,2553d8fa-7de1-44a6-bdbf-57be8bb37e28 +libusb,ATxmega128A1U,03EB,2FED,6d9fd0ff-755d-4e29-bd29-df0a9a7544b9 +libusb,ATxmega64A4U,03EB,2FDD,bcf5e7c3-44a1-4fd1-971f-9ef9843f6291 +libusb,ATxmega128A4U,03EB,2FDE,3f976bb6-36ca-44cc-a728-844bc1d0d168 +libusb,ATxmega64B3,03EB,2FDF,de280c81-c12a-4ca7-bf34-566151786418 +libusb,ATxmega128B3,03EB,2FE0,2ad1ffeb-eb83-4e78-b34a-d5633771991f +libusb,ATxmega64B1,03EB,2FE1,002874a6-7fc7-413b-9ac4-2b52c5a230bd +libusb,ATxmega128B1,03EB,2FEA,60ea9d08-2ae6-4434-b743-ce6f73537136 +libusb,ATxmega256A3BU,03EB,2FE2,5949bd0a-8bd4-417b-b1c5-7d249836bf0d +libusb,ATxmega16A4U,03EB,2FE3,cc3172b0-e86a-4758-914e-951bca6ca7f5 +libusb,ATxmega32A4U,03EB,2FE4,f44c515f-7d17-4612-a532-ee620afb22b2 +libusb,ATxmega64A4U,03EB,2FE5,c1af4f1c-045f-40c9-893a-3ad4adb2e67d +libusb,ATxmega128A3U,03EB,2FE6,26f275f0-d6b2-46d8-8334-e4de66996c74 +libusb,ATxmega192A3U,03EB,2FE7,b7b50d98-0429-4235-8f08-5466e4f83ed4 +libusb,UC3,03EB,2FDC,972d9af7-d71b-44c7-a895-9340b362f545 +libusb,ATUC3,03EB,2FE9,d5855d0a-f82e-4df5-9c14-2b0b1dcb65bd +libusb,AT32UC3C,03EB,2FEB,1eeb52aa-fd24-47fd-8a76-056446d1a54f +libusb,ATxmega256A3U,03EB,2FEC,198fa8ea-3157-4863-b9a8-a3f6fe027367 +libusb,ATmega8U2,03EB,2FEE,14018055-46f4-4c62-aa03-e8fafeedaf72 +libusb,ATmega16U2,03EB,2FEF,007274da-b75f-492e-a288-8fc0aff8339f +libusb,ATmega32U2,03EB,2FF0,ddc2c572-cb6e-4f61-a6cc-1a5de941f063 +libusb,AT32UC3A3,03EB,2FF1,8b614283-36c0-46a2-890d-65f61b5b6201 +libusb,ATmega32U6,03EB,2FF2,a207dd90-2814-4418-b5b7-4b708fdf1bfd +libusb,ATmega16U4,03EB,2FF3,3180d426-bf93-4578-a693-2efbc337da8e +libusb,ATmega32U4,03EB,2FF4,5f9726fd-f9de-487a-9fbd-8b3524a7a56a +libusb,AT32UC3B,03EB,2FF6,ef90068a-277a-44db-805a-9b83a6beb29a +libusb,AT90USB82,03EB,2FF7,062fa2ab-f9d8-4a0d-83c1-df0521cfd0f6 +libusb,AT32UC3A,03EB,2FF8,24080a67-3874-4fb8-8808-fb4cc297c466 +libusb,AT90USB64,03EB,2FF9,c6a708ad-e97d-43cd-b04a-3180d737a71b +libusb,AT90USB162,03EB,2FFA,de67bff5-6e39-4e9c-8dfe-de7fce113716 +libusb,AT90USB128,03EB,2FFB,fd217df3-59d0-440a-a8f3-4c0c8c84daa3 +libusb,AT89C5130,03EB,2FFD,31b69a56-9ac0-4fab-a3ae-cd7bb7021ec5 +libusb,AT8XC5122,03EB,2FFE,395a6118-8568-41b2-913a-d16912722342 +libusb,AT89C5132,03EB,2FFF,266ca4bc-5e59-4a7b-82dc-6e8732373d40 \ No newline at end of file diff --git a/util/wsl_install.sh b/util/wsl_install.sh index c3aeba6d6e..9df715b813 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -1,6 +1,6 @@ #!/bin/bash -download_dir = wsl_downloaded +download_dir=wsl_downloaded function install_utils { rm -f -r $download_dir @@ -33,7 +33,11 @@ function install_utils { popd > /dev/null } -function make_environment { +function install_drivers { + pushd $download_dir + cp ../drivers.txt . + cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt + popd > /dev/null } echo "Installing dependencies (p7zip-full, wget)" @@ -54,5 +58,22 @@ pushd "$dir" #install_utils +while true; do + echo + echo "Which USB drivers do you want to install?" + echo "(A)all - All supported drivers will be installed" + echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed" + echo "(F)force - Like all, but will also override existing drivers for connected keyboards" + echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work" + read -p "(A/C/F/N)? " res + case $res in + [Aa]* ) install_drivers --all; break;; + [Cc]* ) install_drivers; break;; + [Ff]* ) install_drivers --all --force; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac +done + popd > /dev/null -- cgit v1.2.3 From 477bd4b948a7399bcb8ba057362c66278e6b3abf Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 14:49:58 +0300 Subject: Add prompt for re-downloading the utils --- util/wsl_install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 9df715b813..f9c7f60906 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -56,7 +56,19 @@ fi pushd "$dir" -#install_utils +if [ ! -d "$download_dir" ]; then + install_utils +else + while true; do + echo + read -p "The utils seem to already be downloaded, do you want to re-download them and update to the newest version (Y/N) " res + case $res in + [Yy]* ) install_utils; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac + done +fi while true; do echo -- cgit v1.2.3 From 9c582fc797c3fbddd753791aab279dd2ad27b9c4 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 18:26:38 +0300 Subject: Add install dependencies --- util/wsl_install.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index f9c7f60906..0964929e7c 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -40,10 +40,6 @@ function install_drivers { popd > /dev/null } -echo "Installing dependencies (p7zip-full, wget)" -echo "This will ask for the sudo password" -sudo apt-get install p7zip-full wget - dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) if [[ $dir != /mnt/* ]]; @@ -56,6 +52,24 @@ fi pushd "$dir" +while true; do + echo + echo "Do you want to install all toolchain dependencies needed for compiling QMK?" + echo "This will run install_dependencies.sh, which calls apt-get upgrade." + echo "If you don't want that, you can install the dependencies manually." + read -p "(Y/N) " res + case $res in + [Yy]* ) sudo ./install_dependencies.sh; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac +done + +echo "Installing dependencies needed for the installation (p7zip-full, wget)" +echo "This will ask for the sudo password" +sudo apt-get install p7zip-full wget + + if [ ! -d "$download_dir" ]; then install_utils else -- cgit v1.2.3 From b8899b48b45c0209e44cc35d9185aa670e769d40 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 20:11:56 +0300 Subject: Make symlink to utils and export programmer variables --- util/activate_wsl.sh | 12 ++++++++++++ util/wsl_install.sh | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 util/activate_wsl.sh (limited to 'util') diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh new file mode 100644 index 0000000000..a6ed9b712d --- /dev/null +++ b/util/activate_wsl.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +util_dir=~/qmk_utils +download_dir=$util_dir/wsl_downloaded + +export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe +export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe +export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe +export BATCHISP=$download_dir/Flip/bin/batchisp.exe + + + diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 0964929e7c..314f520b95 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -35,7 +35,6 @@ function install_utils { function install_drivers { pushd $download_dir - cp ../drivers.txt . cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt popd > /dev/null } @@ -101,5 +100,11 @@ while true; do esac done +echo +echo "Creating a softlink to the utils directory as ~/qmk_utils." +echo "This is needed so that the the make system can find all utils it need." +read -p "Press any key to continue (ctrl-c to abort)" +ln -sf "$dir" ~/qmk_utils + popd > /dev/null -- cgit v1.2.3 From 3d3999d8635d1c9ca5a0276545ce4bdc173aa9a4 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 20:36:27 +0300 Subject: Actually install flip instead of just extracting --- util/activate_wsl.sh | 2 +- util/wsl_install.sh | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh index a6ed9b712d..afff5addcc 100644 --- a/util/activate_wsl.sh +++ b/util/activate_wsl.sh @@ -6,7 +6,7 @@ download_dir=$util_dir/wsl_downloaded export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe -export BATCHISP=$download_dir/Flip/bin/batchisp.exe +export BATCHISP=batchisp.exe diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 314f520b95..b1e47d637b 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -22,13 +22,12 @@ function install_utils { echo "Installing Atmel Flip" wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' - 7z x -oFlip Flip\ Installer\ -\ 3.4.7.112.exe + mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe echo "Downloading the QMK driver installer" wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - rm -f *.zip - rm Flip\ Installer\ -\ 3.4.7.112.exe popd > /dev/null } @@ -83,6 +82,17 @@ else done fi +while true; do + echo + read -p "Flip need to be installed if you want to use that for programming, do you want to install it now? (Y/N) " res + case $res in + [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac +done + + while true; do echo echo "Which USB drivers do you want to install?" @@ -106,5 +116,11 @@ echo "This is needed so that the the make system can find all utils it need." read -p "Press any key to continue (ctrl-c to abort)" ln -sf "$dir" ~/qmk_utils +echo +echo "******************************************************************************" +echo "Installation completed!" +echo "You need to open a new batch command prompt for all the utils to work properly" +echo "******************************************************************************" + popd > /dev/null -- cgit v1.2.3 From 3e4f2f5590028851886df54e608d4215883939ba Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 20:43:16 +0300 Subject: Use unzip instead of 7zip --- util/wsl_install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index b1e47d637b..645ddce71e 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -10,15 +10,15 @@ function install_utils { echo "Installing dfu-programmer" wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' - 7z x -odfu-programmer dfu-programmer-win-0.7.2.zip + unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip echo "Installing dfu-util" wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' - 7z x dfu-util-0.9-win64.zip + unzip dfu-util-0.9-win64.zip echo "Installing teensy_loader_cli" wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' - 7z x teensy_loader_cli_windows.zip + unzip teensy_loader_cli_windows.zip echo "Installing Atmel Flip" wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' @@ -63,9 +63,9 @@ while true; do esac done -echo "Installing dependencies needed for the installation (p7zip-full, wget)" +echo "Installing dependencies needed for the installation (unzip, wget)" echo "This will ask for the sudo password" -sudo apt-get install p7zip-full wget +sudo apt-get install unzip wget if [ ! -d "$download_dir" ]; then -- cgit v1.2.3 From fa4a492677d1435637dceee03302e1bdbd579a2d Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 20:49:42 +0300 Subject: Fix symlink creation --- util/wsl_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 645ddce71e..bb2df1b4da 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -114,7 +114,7 @@ echo echo "Creating a softlink to the utils directory as ~/qmk_utils." echo "This is needed so that the the make system can find all utils it need." read -p "Press any key to continue (ctrl-c to abort)" -ln -sf "$dir" ~/qmk_utils +ln -sfn "$dir" ~/qmk_utils echo echo "******************************************************************************" -- cgit v1.2.3 From ec720ac1ea63b3afa2988be06b221d2ed10a2af9 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 21:28:18 +0300 Subject: Add activate_wsl to .bashrc --- util/activate_wsl.sh | 17 +++++++++++------ util/wsl_install.sh | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) (limited to 'util') diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh index afff5addcc..e2312b56d4 100644 --- a/util/activate_wsl.sh +++ b/util/activate_wsl.sh @@ -1,12 +1,17 @@ #!/bin/bash -util_dir=~/qmk_utils -download_dir=$util_dir/wsl_downloaded +function export_variables { + local util_dir=~/qmk_utils + local download_dir=$util_dir/wsl_downloaded + + export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe + export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe + export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe + export BATCHISP=batchisp.exe +} + +export_variables -export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe -export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe -export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe -export BATCHISP=batchisp.exe diff --git a/util/wsl_install.sh b/util/wsl_install.sh index bb2df1b4da..f863c182e0 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -116,6 +116,26 @@ echo "This is needed so that the the make system can find all utils it need." read -p "Press any key to continue (ctrl-c to abort)" ln -sfn "$dir" ~/qmk_utils +if grep "^source ~/qmk_utils/activate_wsl.sh$" ~/.bashrc +then + echo + echo "The line source ~/qmk_utils/activate_wsl.sh is already added to your /.bashrc" + echo "Not adding it twice" +else + while true; do + echo + echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of you .bashrc file?" + echo "Without this make won't find the needed utils, so if you don't want to do it automatically," + echo "then you have to do it manually." + read -p "(Y/N)? " res + case $res in + [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac + done +fi + echo echo "******************************************************************************" echo "Installation completed!" -- cgit v1.2.3 From 999b35c7f8a2fdccf3f8710c2704034bb426b711 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 May 2017 21:38:14 +0300 Subject: Create a symlink to qmk if requested --- util/wsl_install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'util') diff --git a/util/wsl_install.sh b/util/wsl_install.sh index f863c182e0..8999da8a46 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -136,6 +136,19 @@ else done fi +while true; do + echo + echo "Do you want to add a symlink to the QMK repository in your home directory for convenience?" + echo "This will create a folder 'qmk_firmware' in your home directory." + echo "In the future you can use this folder instead of the full path on your windows file system" + read -p "(Y/N)? " res + case $res in + [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;; + [Nn]* ) break;; + * ) echo "Invalid answer";; + esac +done + echo echo "******************************************************************************" echo "Installation completed!" -- cgit v1.2.3 From 71feac57175f5a3d09e96cc579f5d5c3477adb7b Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 28 May 2017 16:16:56 -0400 Subject: ignore docs, fix tag/hex pushing --- util/qmk.fm.enc | Bin 0 -> 3248 bytes util/qmk_firmware.enc | Bin 0 -> 3248 bytes util/travis_compiled_push.sh | 14 +++++++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 util/qmk.fm.enc create mode 100644 util/qmk_firmware.enc (limited to 'util') diff --git a/util/qmk.fm.enc b/util/qmk.fm.enc new file mode 100644 index 0000000000..d7aa462703 Binary files /dev/null and b/util/qmk.fm.enc differ diff --git a/util/qmk_firmware.enc b/util/qmk_firmware.enc new file mode 100644 index 0000000000..1cd82ba86d Binary files /dev/null and b/util/qmk_firmware.enc differ diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 718daaa295..dcf408a2e9 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,6 +7,14 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in util/qmk_firmware.enc -out qmk_firmware -d +openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in util/qmk.fm.enc -out qmk.fm -d +chmod 600 qmk_firmware +chmod 600 qmk.fm +eval `ssh-agent -s` +ssh-add qmk_firmware +ssh-add qmk.fm + if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then increment_version () @@ -17,14 +25,14 @@ increment_version () echo -e "${new// /.}" } -NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) +NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." git fetch --tags lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware + git push --tags else echo "No essential files modified." fi @@ -34,7 +42,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make ergodox-ez AUTOGEN=true cd .. - git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git + git clone git@github.com:qmk/qmk.fm.git cd qmk.fm #git submodule update --init --recursive #rm -rf keyboard -- cgit v1.2.3 From ae6b803ad61d647febbfe806d795b8b757fce074 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 29 May 2017 10:54:46 -0400 Subject: more than one en-file, and actually ignore docs --- util/qmk.fm.enc | Bin 3248 -> 0 bytes util/qmk_firmware.enc | Bin 3248 -> 0 bytes util/travis_build.sh | 2 +- util/travis_compiled_push.sh | 6 ++---- 4 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 util/qmk.fm.enc delete mode 100644 util/qmk_firmware.enc (limited to 'util') diff --git a/util/qmk.fm.enc b/util/qmk.fm.enc deleted file mode 100644 index d7aa462703..0000000000 Binary files a/util/qmk.fm.enc and /dev/null differ diff --git a/util/qmk_firmware.enc b/util/qmk_firmware.enc deleted file mode 100644 index 1cd82ba86d..0000000000 Binary files a/util/qmk_firmware.enc and /dev/null differ diff --git a/util/travis_build.sh b/util/travis_build.sh index 6bafd1941f..5b0951c6e0 100644 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -5,7 +5,7 @@ TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then exit_code=0 - NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) + NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) if [[ $NEFM -gt 0 ]] ; then echo "Making all keymaps for all keyboards" make all-keyboards AUTOGEN="true" diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index dcf408a2e9..a5bbe70ece 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,12 +7,10 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" -openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in util/qmk_firmware.enc -out qmk_firmware -d -openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in util/qmk.fm.enc -out qmk.fm -d -chmod 600 qmk_firmware +chmod 600 id_rsa_qmk_firmware chmod 600 qmk.fm eval `ssh-agent -s` -ssh-add qmk_firmware +ssh-add id_rsa_qmk_firmware ssh-add qmk.fm if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then -- cgit v1.2.3 From 44832127d72e66e422a40e2bebc27e14236807c3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 29 May 2017 12:14:49 -0400 Subject: push to git url --- util/travis_compiled_push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index a5bbe70ece..a2fc2b1941 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -30,7 +30,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags + git push --tags git@github.com:qmk/qmk_firmware.git else echo "No essential files modified." fi @@ -55,7 +55,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git add -A git commit -m "generated from qmk/qmk_firmware@${rev}" - git push + git push git@github.com:qmk/qmk.fm.git master fi -- cgit v1.2.3 From 0c351fa98bff6a2e9d3ff30cc19d6b0782b85a62 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 29 May 2017 12:49:25 -0400 Subject: no master needed on push maybe --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index a2fc2b1941..853795369f 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -55,7 +55,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git add -A git commit -m "generated from qmk/qmk_firmware@${rev}" - git push git@github.com:qmk/qmk.fm.git master + git push git@github.com:qmk/qmk.fm.git fi -- cgit v1.2.3 From 7eccbfe73764dbac0c33065394a8b86c4952eabf Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 30 May 2017 11:46:25 -0400 Subject: exclude PRs --- util/travis_compiled_push.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 853795369f..2f5f74f93e 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -4,16 +4,18 @@ set -o errexit -o nounset rev=$(git rev-parse --short HEAD) +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then + git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d +tar xvf secrets.tar + chmod 600 id_rsa_qmk_firmware chmod 600 qmk.fm eval `ssh-agent -s` ssh-add id_rsa_qmk_firmware -ssh-add qmk.fm - -if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then increment_version () { @@ -42,6 +44,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then cd .. git clone git@github.com:qmk/qmk.fm.git cd qmk.fm + ssh-add ../qmk_firmware/qmk.fm #git submodule update --init --recursive #rm -rf keyboard #rm -rf keyboards -- cgit v1.2.3 From 9ecfc2329295b572bc4c5a6f4569f6d0fc2840aa Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 30 May 2017 12:49:26 -0400 Subject: make qmk bot do the hard work --- util/travis_compiled_push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 2f5f74f93e..4e08be1206 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -6,8 +6,8 @@ rev=$(git rev-parse --short HEAD) if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then -git config --global user.name "Travis CI" -git config --global user.email "jack.humb+travis.ci@gmail.com" +git config --global user.name "QMK Bot" +git config --global user.email "hello@qmk.fm" openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d tar xvf secrets.tar -- cgit v1.2.3