summaryrefslogtreecommitdiff
path: root/tusb_helpers.h.gen
diff options
context:
space:
mode:
Diffstat (limited to 'tusb_helpers.h.gen')
-rwxr-xr-xtusb_helpers.h.gen7
1 files changed, 4 insertions, 3 deletions
diff --git a/tusb_helpers.h.gen b/tusb_helpers.h.gen
index 71173df..a348b16 100755
--- a/tusb_helpers.h.gen
+++ b/tusb_helpers.h.gen
@@ -61,9 +61,10 @@ cat <<'EOT'
* to sort their list of by most-significant-byte was a poor editorial choice.
*/
EOT
-[ -f MS-LCID.pdf ] || wget -O MS-LCID.pdf 'https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf'
-[ -f MS-LCID.txt ] || pdftotext -layout MS-LCID.pdf
-<MS-LCID.txt \
+[ -d 3rd-party ] || mkdir 3rd-party
+[ -f 3rd-party/MS-LCID.pdf ] || wget -O 3rd-party/MS-LCID.pdf 'https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf'
+[ -f 3rd-party/MS-LCID.txt ] || pdftotext -layout 3rd-party/MS-LCID.pdf
+<3rd-party/MS-LCID.txt \
grep -E '^\s*0x[0-9A-F]{4}\s+[a-z]' | sed 's/,.*//' | grep -v reserved | # find the lines we're interested in
sed -E 's/^\s*0x(..)(..)\s+(\S.*)/\2 \1 \3/p' | tr '[:lower:]-' '[:upper:]_' | # format them as 'PRIhex SUBhex UPPER_STR'
sort |