diff options
author | Chris Johns <chrisj@rtems.org> | 2012-09-19 17:43:27 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2012-09-19 17:43:27 +1000 |
commit | cd6e786d3d3ea0e728174cc17c48ad29c580731e (patch) | |
tree | b84d7ff2e4aa141dd1a1a6578497721e91c61004 | |
parent | e052f46d46e44e54a03a3b0091afa285b830e886 (diff) |
Fix the options handling when awk is a full path.
-rw-r--r-- | mksyms.awk | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -71,10 +71,14 @@ BEGIN { embed = 1 delete ARGV[a]; } - else if (ARGV[a] != "-" && ARGV[a] != "awk") + else if (ARGV[a] != "-") { - print ("invalid option:", ARGV[a]); - exit 2 + ap = index (ARGV[a], "awk") + if ((ap == 0) || (ap != (length(ARGV[a]) - 2))) + { + print ("invalid option:", ARGV[a]); + exit 2 + } } } c_header(); |