`tsxs' fails to recognize command line switches
-----------------------------------------------
Key: TS-635
URL: https://issues.apache.org/jira/browse/TS-635
Project: Traffic Server
Issue Type: Bug
Components: TSAPI
Affects Versions: 2.1.5
Reporter: Arno Toell
Priority: Minor
Fix For: 2.1.5
The compile and linking helper `tsxs', shipped with traffic server fails to
recognize command line switches if they are supplied out of order:
{noformat}
r...@test1:~/build-area/example/session-1# tsxs -o session.so -c session-1.c
compiling session-1.c -> session-1.lo
compiling ->
gcc: argument to '-o' is missing
Compile failed: gcc -I/usr/include -fpic -c -o
r...@test1:~/build-area/example/session-1# tsxs -c session-1.c -o session.so
compiling session-1.c -> session-1.lo
linking -> session.so
{noformat}
This happens because the script triggers immediate action if a switch is
encountered while parsing the command line. A better approach would be to parse
the command line first and handle later.
Since this is a reasonable small script I'd offer to redo it in Perl in a
cleaner way if you want to get rid of that limited shell code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.