Update buck

$TMP, $DEPS, $SRCS, $OUT are no longer supplied by Buck in the
environment unless they appear in the command line.  Pass $TMP
where it was assumed to be magically supplied. This allows steps
to continue to use buck-out/gen/ for temporary storage instead of
polluting the system /tmp.

Change-Id: Iea8380e5f93fa16ec77457eb76404832bde93a39
This commit is contained in:
Shawn Pearce
2013-10-17 20:29:05 -07:00
parent 364dfaf7d7
commit 55583ac43e
5 changed files with 11 additions and 10 deletions

View File

@@ -15,7 +15,7 @@
from __future__ import print_function
from optparse import OptionParser
from os import environ, makedirs, path, symlink
from os import makedirs, path, symlink
from subprocess import check_call
import sys
from util import check_output
@@ -24,9 +24,10 @@ opts = OptionParser()
opts.add_option('-o', help='path to write WAR to')
opts.add_option('--lib', action='append', help='target for WEB-INF/lib')
opts.add_option('--pgmlib', action='append', help='target for WEB-INF/pgm-lib')
opts.add_option('--tmp', help='temporary directory')
args, ctx = opts.parse_args()
war = environ['TMP']
war = args.tmp
root = war[:war.index('buck-out')]
jars = set()
@@ -51,4 +52,4 @@ try:
check_call(['zip', '-9qr', args.o, '.'], cwd = war)
except KeyboardInterrupt:
print('Interrupted by user', file=sys.stderr)
exit(1)
exit(1)