2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
7 from driver_env import env
13 # just pass all args through to 'ARGS' and eventually to the underlying tool
14 PATTERNS = [ ( '(.*)', "env.append('ARGS', $0)") ]
22 driver_tools.ParseArgs(argv, PATTERNS)
24 # Note: --plugin must come after the command flags, but before the filename.
25 # (definitely confirmed that it cannot go before the command)
26 # for now assume command is just the very first args
27 args = env.get('ARGS')
29 env.set('COMMAND', command)
30 env.set('ARGS', *args)
31 driver_tools.Run('"${AR}" ${COMMAND} --plugin=${GOLD_PLUGIN_SO} ${ARGS}')
32 # only reached in case of no errors
36 def get_help(unused_argv):
38 Usage: %s [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [member-name] [count] archive-file file...
40 d - delete file(s) from the archive
41 m[ab] - move file(s) in the archive
42 p - print file(s) found in the archive
43 q[f] - quick append file(s) to the archive
44 r[ab][f][u] - replace existing or insert new file(s) into the archive
46 t - display contents of archive
47 x[o] - extract file(s) from the archive
48 command specific modifiers:
49 [a] - put file(s) after [member-name]
50 [b] - put file(s) before [member-name] (same as [i])
51 [D] - use zero for timestamps and uids/gids
52 [N] - use instance [count] of name
53 [f] - truncate inserted file names
54 [P] - use full path names when matching
55 [o] - preserve original dates
56 [u] - only replace files that are newer than current archive contents
58 [c] - do not warn if the library had to be created
59 [s] - create an archive index (cf. ranlib)
60 [S] - do not build a symbol table
61 [T] - make a thin archive
63 [V] - display the version number
64 @<file> - read options from <file>
65 """ % env.getone('SCRIPT_NAME')