author | clem <clem> | 2004-09-24 12:39:50 (UTC) |
---|---|---|
committer | clem <clem> | 2004-09-24 12:39:50 (UTC) |
commit | 478b2ead47a09956cadfacb8f469fb2fdee5531c (patch) (unidiff) | |
tree | 2e028e3de22a822d6ae779640e14999030ac3107 /libopie2/tools | |
parent | 4761d0610715569c7af83dc68ffc90fea4d35690 (diff) | |
download | opie-478b2ead47a09956cadfacb8f469fb2fdee5531c.zip opie-478b2ead47a09956cadfacb8f469fb2fdee5531c.tar.gz opie-478b2ead47a09956cadfacb8f469fb2fdee5531c.tar.bz2 |
Denote the end of the xargs parameters, to avoid "xargs: invalid option -- v"
kind of errors with old xargs.
-rwxr-xr-x | libopie2/tools/regen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/tools/regen.py b/libopie2/tools/regen.py index 89385e1..2f53a14 100755 --- a/libopie2/tools/regen.py +++ b/libopie2/tools/regen.py | |||
@@ -1,38 +1,38 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
2 | 2 | ||
3 | """Regenerate C++ mapping classes""" | 3 | """Regenerate C++ mapping classes""" |
4 | 4 | ||
5 | #---------------------------------------------------------------------------# | 5 | #---------------------------------------------------------------------------# |
6 | # # | 6 | # # |
7 | #---------------------------------------------------------------------------# | 7 | #---------------------------------------------------------------------------# |
8 | 8 | ||
9 | def regenDebugMapper( basename ): | 9 | def regenDebugMapper( basename ): |
10 | """ | 10 | """ |
11 | Debug Mapper - maps ioctl numbers to names, e.g. 0x4x5a -> SIOCGIWNAME | 11 | Debug Mapper - maps ioctl numbers to names, e.g. 0x4x5a -> SIOCGIWNAME |
12 | """ | 12 | """ |
13 | 13 | ||
14 | result = os.popen( 'find /usr/include -name "*.h" |xargs grep -h SIOC|grep 0x' ).readlines() | 14 | result = os.popen( 'find /usr/include -name "*.h" |xargs -- grep -h SIOC|grep 0x' ).readlines() |
15 | 15 | ||
16 | try: | 16 | try: |
17 | tablehfile = file( basename+".h", "w" ) | 17 | tablehfile = file( basename+".h", "w" ) |
18 | except: | 18 | except: |
19 | tablehfile = sys.stdout | 19 | tablehfile = sys.stdout |
20 | 20 | ||
21 | try: | 21 | try: |
22 | tablecfile = file( basename+".cpp", "w" ) | 22 | tablecfile = file( basename+".cpp", "w" ) |
23 | except: | 23 | except: |
24 | tablecfile = sys.stdout | 24 | tablecfile = sys.stdout |
25 | 25 | ||
26 | print >>tablehfile,""" | 26 | print >>tablehfile,""" |
27 | /* | 27 | /* |
28 | * debug value mapper - generated by %s - (C) Michael 'Mickey' Lauer <mickey@vanille.de> | 28 | * debug value mapper - generated by %s - (C) Michael 'Mickey' Lauer <mickey@vanille.de> |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef DEBUGMAPPER_H | 31 | #ifndef DEBUGMAPPER_H |
32 | #define DEBUGMAPPER_H | 32 | #define DEBUGMAPPER_H |
33 | 33 | ||
34 | #include <qstring.h> | 34 | #include <qstring.h> |
35 | #include <qintdict.h> | 35 | #include <qintdict.h> |
36 | 36 | ||
37 | typedef QIntDict<QString> IntStringMap; | 37 | typedef QIntDict<QString> IntStringMap; |
38 | 38 | ||
@@ -248,25 +248,25 @@ const QString& OManufacturerDB::lookupExt( const QString& macaddr ) const | |||
248 | #---------------------------------------------------------------------------# | 248 | #---------------------------------------------------------------------------# |
249 | # # | 249 | # # |
250 | #---------------------------------------------------------------------------# | 250 | #---------------------------------------------------------------------------# |
251 | 251 | ||
252 | import sys | 252 | import sys |
253 | import os | 253 | import os |
254 | import copy | 254 | import copy |
255 | 255 | ||
256 | if __name__ == "__main__": | 256 | if __name__ == "__main__": |
257 | if len( sys.argv ) != 3: | 257 | if len( sys.argv ) != 3: |
258 | print """ | 258 | print """ |
259 | Usage: %s <table> <basename> | 259 | Usage: %s <table> <basename> |
260 | 260 | ||
261 | Available tables: %s | 261 | Available tables: %s |
262 | """ % ( sys.argv[0], [ str(k)[5:] for k in copy.copy( locals() ) if k.startswith( "regen" ) ] ) | 262 | """ % ( sys.argv[0], [ str(k)[5:] for k in copy.copy( locals() ) if k.startswith( "regen" ) ] ) |
263 | sys.exit( -1 ) | 263 | sys.exit( -1 ) |
264 | 264 | ||
265 | try: | 265 | try: |
266 | func = locals()["regen%s" % sys.argv[1]] | 266 | func = locals()["regen%s" % sys.argv[1]] |
267 | except KeyError: | 267 | except KeyError: |
268 | print "Table '%s' unknown." % sys.argv[1] | 268 | print "Table '%s' unknown." % sys.argv[1] |
269 | sys.exit( -1 ) | 269 | sys.exit( -1 ) |
270 | else: | 270 | else: |
271 | func( sys.argv[2] ) | 271 | func( sys.argv[2] ) |
272 | sys.exit( 0 ) \ No newline at end of file | 272 | sys.exit( 0 ) |