aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2008-07-26 15:25:21 +0000
committerKris Kennaway <kris@FreeBSD.org>2008-07-26 15:25:21 +0000
commit6c3363b444e54c546dfe5127d7a733fe859d8ff8 (patch)
tree324b7a3ac47fb244e80df35917b9c72f58d49abc /Tools
parent88e9a3230843bf0b0b6d9127b823ef3dc45e2487 (diff)
downloadports-6c3363b444e54c546dfe5127d7a733fe859d8ff8.tar.gz
ports-6c3363b444e54c546dfe5127d7a733fe859d8ff8.zip
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/buildproxy-client32
1 files changed, 32 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/buildproxy-client b/Tools/portbuild/scripts/buildproxy-client
new file mode 100755
index 000000000000..e5ebcfed05cf
--- /dev/null
+++ b/Tools/portbuild/scripts/buildproxy-client
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+#
+# Client for communicating proxy requests to the buildproxy
+
+import sys, socket, os, commands
+
+from freebsd import *
+
+SOCKET='/tmp/.build'
+
+try:
+ s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ s.connect(SOCKET)
+
+ sockfile = s.makefile()
+ sockfile.write("%s\n" % " ".join(sys.argv[1:]))
+ sockfile.flush()
+ code = sockfile.readline().strip()
+ out = "".join(sockfile.readlines())
+
+ if out:
+ print out
+
+ sockfile.close()
+ s.close()
+
+ sys.exit(int(code))
+except:
+ raise # XXX debug
+ sys.exit(254)
+
+