Align our subprocess usage with current best practices. (#12940)

* Align our subprocess usage with current best practices.

* remove unused import

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

* fix the cpp invocation for older python

* allow for unprompted installation

* make sure qmk new-keyboard works on windows

Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
Zach White
2021-05-19 15:24:46 -07:00
committed by GitHub
parent a9aec546c8
commit db1eacdaac
22 changed files with 70 additions and 78 deletions

View File

@ -5,7 +5,7 @@ DEBCONF_NONINTERACTIVE_SEEN=true
export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
_qmk_install_prepare() {
sudo apt-get update
sudo apt-get update $SKIP_PROMPT
}
_qmk_install() {

View File

@ -4,7 +4,7 @@ _qmk_install() {
echo "Installing dependencies"
# TODO: Check whether devel/headers packages are really needed
sudo dnf -y install \
sudo dnf $SKIP_PROMPT install \
clang diffutils git gcc glibc-headers kernel-devel kernel-headers make unzip wget zip \
python3 \
avr-binutils avr-gcc avr-libc \

View File

@ -1,7 +1,7 @@
#!/bin/bash
_qmk_install_prepare() {
sudo pkg update
sudo pkg update $SKIP_PROMPT
}
_qmk_install() {

View File

@ -1,7 +1,7 @@
#!/bin/bash
_qmk_install_prepare() {
pacman -Syu
pacman -Syu $MSYS2_CONFIRM
}
_qmk_install() {

View File

@ -3,7 +3,7 @@
_qmk_install() {
echo "Installing dependencies"
sudo xbps-install \
sudo xbps-install $SKIP_PROMPT \
gcc git make wget unzip zip \
python3-pip \
avr-binutils avr-gcc avr-libc \

View File

@ -2,6 +2,13 @@
QMK_FIRMWARE_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
QMK_FIRMWARE_UTIL_DIR=$QMK_FIRMWARE_DIR/util
if [ "$1" = "-y" ]; then
SKIP_PROMPT='-y'
MSYS2_CONFIRM='--noconfirm'
else
SKIP_PROMPT=''
MSYS2_CONFIRM=''
fi
case $(uname -a) in
*Darwin*)