Ticket #14619: ld.sh
File ld.sh, 399 bytes (added by Veence (Vincent), 16 years ago) |
---|
Line | |
---|---|
1 | #!/bin/sh |
2 | newargs="" |
3 | output_flag=0 |
4 | output_name="" |
5 | |
6 | for arg in $@ |
7 | do |
8 | if [ "$output_flag" -eq "1" ] |
9 | then |
10 | output_flag=2 |
11 | output_name=$arg |
12 | |
13 | elif [ $arg == "-o" ] && [ "$output_flag" -eq "0" ] |
14 | then |
15 | output_flag=1 |
16 | |
17 | elif `echo $arg | grep -E -e "^-o" > /dev/null` && [ "$output_flag" -eq "0" ] |
18 | then |
19 | output_name=`echo $arg | sed "s/^-o//"` |
20 | output_flag=2 |
21 | |
22 | else |
23 | newargs+="$arg " |
24 | fi |
25 | done |
26 |