diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-05-27 09:57:30 +1000 |
---|---|---|
committer | Sergey Udaltsov <sergey.udaltsov@gmail.com> | 2020-06-02 20:04:48 +0000 |
commit | a3db589bc4f0dab7233beb92b320ca9368d951a5 (patch) | |
tree | d20e592813f528c275ae7a479d66e0713ca09385 /scripts | |
parent | bdfeee6129eb031d93bb2f39e421fc1ed606b706 (diff) | |
download | xkeyboard-config-a3db589bc4f0dab7233beb92b320ca9368d951a5.tar.gz |
symbols: move the extractGroupNames.sh script to a new scripts/ directory
Unclear if this has been used in the 16 years since it was written, but let's
keep it around (after a rename, some comments and a minor improvement so it
takes the symbols dir as argument instead of assuming $PWD).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/extract-group-names-from-symbols.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/extract-group-names-from-symbols.sh b/scripts/extract-group-names-from-symbols.sh new file mode 100755 index 0000000..2865b95 --- /dev/null +++ b/scripts/extract-group-names-from-symbols.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Usage: extract-group-names-from-symbols.sh ../symbols +# +# Extract the Group1 names from all symbol files in the given directory +# +# Example output: +# us:"Atsina" +# us:"Cherokee" +# us:"Coeur d'Alene Salish" +# us:"Czech Slovak and German (US)" +# us:"English (3l)" +# us:"English (3l, Chromebook)" +# us:"English (3l, emacs)" +# us:"English (Carpalx)" + +pushd $1 > /dev/null +grep 'name\[Group1\]' * | sed 's/[[:space:]]*name\[Group1\].*=[[:space:]]*//;s/;[[:space:]]*$//' | sort +popd > /dev/null |