summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-09-19 17:43:27 +1000
committerChris Johns <chrisj@rtems.org>2012-09-19 17:43:27 +1000
commitcd6e786d3d3ea0e728174cc17c48ad29c580731e (patch)
treeb84d7ff2e4aa141dd1a1a6578497721e91c61004
parente052f46d46e44e54a03a3b0091afa285b830e886 (diff)
Fix the options handling when awk is a full path.
-rw-r--r--mksyms.awk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mksyms.awk b/mksyms.awk
index 99bce48..2f39767 100644
--- a/mksyms.awk
+++ b/mksyms.awk
@@ -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();