diff options
author | huderlem <huderlem@gmail.com> | 2020-02-15 09:06:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 09:06:38 -0600 |
commit | 74e171579e0bbefbd72b83f3764fe504464bbdbe (patch) | |
tree | 8db5aacbe963fef56eb2d9965fc87db1a6642387 /gcc_arm/sort-protos | |
parent | 27176890c4a688ea7de44d3f55af32827016a9fd (diff) | |
parent | c6bcd24dfe44d58ed1b6bef6653270dbf6cd6bfa (diff) |
Merge pull request #30 from camthesaxman/arm_support
Build ARM compiler
Diffstat (limited to 'gcc_arm/sort-protos')
-rwxr-xr-x | gcc_arm/sort-protos | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc_arm/sort-protos b/gcc_arm/sort-protos new file mode 100755 index 0000000..493e9f0 --- /dev/null +++ b/gcc_arm/sort-protos @@ -0,0 +1,9 @@ +#!/bin/sh +# Sort the sys-protos.h file in its usual order. +# Invoke as `sort-protos sys-protos.h'. + +input=$1 + +sed 's/\(.*[ \*]\)\([a-zA-Z0-9_][a-zA-Z0-9_]*\)[ ]*\(([^\*].*\)$/\2%\1%\3/' $input | sort -u | awk -F% '{printf "%-30.30s%s%s\n", $2, $1, $3}' > tmp.$input + +mv -f tmp.$input $input |