diff options
Diffstat (limited to 'util')
| -rwxr-xr-x | util/new_keyboard.sh | 6 | ||||
| -rw-r--r-- | util/udev/50-qmk.rules | 6 | ||||
| -rwxr-xr-x | util/update_chibios_mirror.sh | 83 |
3 files changed, 95 insertions, 0 deletions
diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index d0db23bb4..87b7cde0c 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh | |||
| @@ -129,6 +129,12 @@ if [ ! -d "quantum" ]; then | |||
| 129 | exit 1 | 129 | exit 1 |
| 130 | fi | 130 | fi |
| 131 | 131 | ||
| 132 | echo_bold "########################################" | ||
| 133 | echo_bold "# NOTICE #" | ||
| 134 | echo_bold "# This script has been deprecated. #" | ||
| 135 | echo_bold "# Please use qmk new-keyboard instead. #" | ||
| 136 | echo_bold "########################################" | ||
| 137 | echo | ||
| 132 | echo_bold "Generating a new QMK keyboard directory" | 138 | echo_bold "Generating a new QMK keyboard directory" |
| 133 | echo | 139 | echo |
| 134 | 140 | ||
diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules index 679fe4ced..db27d4dc8 100644 --- a/util/udev/50-qmk.rules +++ b/util/udev/50-qmk.rules | |||
| @@ -63,3 +63,9 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uacc | |||
| 63 | 63 | ||
| 64 | # hid_listen | 64 | # hid_listen |
| 65 | KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" | 65 | KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" |
| 66 | |||
| 67 | # hid bootloaders | ||
| 68 | ## QMK HID | ||
| 69 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess" | ||
| 70 | ## PJRC's HalfKay | ||
| 71 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess" | ||
diff --git a/util/update_chibios_mirror.sh b/util/update_chibios_mirror.sh new file mode 100755 index 000000000..d4593a843 --- /dev/null +++ b/util/update_chibios_mirror.sh | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | ################################ | ||
| 4 | # Configuration | ||
| 5 | |||
| 6 | # The ChibiOS branches to mirror | ||
| 7 | chibios_branches="trunk stable_20.3.x stable_21.6.x" | ||
| 8 | |||
| 9 | # The ChibiOS tags to mirror | ||
| 10 | chibios_tags="ver20.3.1 ver20.3.2 ver20.3.3 ver21.6.0" | ||
| 11 | |||
| 12 | # The ChibiOS-Contrib branches to mirror | ||
| 13 | contrib_branches="master chibios-20.3.x" | ||
| 14 | |||
| 15 | ################################ | ||
| 16 | # Actions | ||
| 17 | |||
| 18 | set -eEuo pipefail | ||
| 19 | umask 022 | ||
| 20 | |||
| 21 | this_script="$(realpath "${BASH_SOURCE[0]}")" | ||
| 22 | script_dir="$(realpath "$(dirname "$this_script")")" | ||
| 23 | qmk_firmware_dir="$(realpath "$script_dir/../")" | ||
| 24 | chibios_dir="$qmk_firmware_dir/lib/chibios" | ||
| 25 | contrib_dir="$qmk_firmware_dir/lib/chibios-contrib" | ||
| 26 | |||
| 27 | chibios_git_location=$(realpath "$chibios_dir/$(cat "$chibios_dir/.git" | awk '/gitdir:/ {print $2}')") | ||
| 28 | chibios_git_config=$(realpath "$chibios_git_location/config") | ||
| 29 | contrib_git_location=$(realpath "$contrib_dir/$(cat "$contrib_dir/.git" | awk '/gitdir:/ {print $2}')") | ||
| 30 | contrib_git_config=$(realpath "$contrib_git_location/config") | ||
| 31 | |||
| 32 | cd "$chibios_dir" | ||
| 33 | |||
| 34 | if [[ -z "$(cat "$chibios_git_config" | grep '\[svn-remote "svn"\]')" ]] ; then | ||
| 35 | git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/ | ||
| 36 | fi | ||
| 37 | |||
| 38 | if [[ -z "$(cat "$chibios_git_config" | grep '\[remote "qmk"\]')" ]] ; then | ||
| 39 | git remote add qmk git@github.com:qmk/ChibiOS.git | ||
| 40 | git remote set-url qmk git@github.com:qmk/ChibiOS.git --push | ||
| 41 | fi | ||
| 42 | |||
| 43 | echo "Updating remotes..." | ||
| 44 | git fetch --all --tags --prune | ||
| 45 | |||
| 46 | echo "Fetching latest from subversion..." | ||
| 47 | git svn fetch | ||
| 48 | |||
| 49 | echo "Updating ChibiOS branches..." | ||
| 50 | for branch in $chibios_branches ; do | ||
| 51 | echo "Creating branch 'svn-mirror/$branch' from 'svn/$branch'..." | ||
| 52 | git branch -f svn-mirror/$branch svn/$branch \ | ||
| 53 | && git push qmk svn-mirror/$branch | ||
| 54 | done | ||
| 55 | |||
| 56 | echo "Updating ChibiOS tags..." | ||
| 57 | for tagname in $chibios_tags ; do | ||
| 58 | echo "Creating tag 'svn-mirror/$tagname' from 'svn/tags/$tagname'..." | ||
| 59 | GIT_COMMITTER_DATE="$(git log -n1 --pretty=format:'%ad' svn/tags/$tagname)" git tag -f -a -m "Tagging $tagname" svn-mirror/$tagname svn/tags/$tagname | ||
| 60 | git push qmk svn-mirror/$tagname | ||
| 61 | done | ||
| 62 | |||
| 63 | cd "$contrib_dir" | ||
| 64 | |||
| 65 | if [[ -z "$(cat "$contrib_git_config" | grep '\[remote "qmk"\]')" ]] ; then | ||
| 66 | git remote add qmk git@github.com:qmk/ChibiOS-Contrib.git | ||
| 67 | git remote set-url qmk git@github.com:qmk/ChibiOS-Contrib.git --push | ||
| 68 | fi | ||
| 69 | |||
| 70 | if [[ -z "$(cat "$contrib_git_config" | grep '\[remote "upstream"\]')" ]] ; then | ||
| 71 | git remote add upstream git@github.com:ChibiOS/ChibiOS-Contrib.git | ||
| 72 | git remote set-url upstream git@github.com:ChibiOS/ChibiOS-Contrib.git --push | ||
| 73 | fi | ||
| 74 | |||
| 75 | echo "Updating remotes..." | ||
| 76 | git fetch --all --tags --prune | ||
| 77 | |||
| 78 | echo "Updating ChibiOS-Contrib branches..." | ||
| 79 | for branch in $contrib_branches ; do | ||
| 80 | echo "Creating branch 'mirror/$branch' from 'upstream/$branch'..." | ||
| 81 | git branch -f mirror/$branch upstream/$branch \ | ||
| 82 | && git push qmk mirror/$branch | ||
| 83 | done | ||
