Skip to content

Commit

Permalink
For cross-platform build take the linux version of printenv.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Trofimov committed Sep 29, 2016
1 parent ffb30fb commit 92ea85e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions bin/linux/printenv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python

# Dumps environment variables into specified file.
# Format: zero-separated "name=value" pairs in platform encoding.

import os
import sys

if len(sys.argv) != 2:
raise Exception('Exactly one argument expected')

f = open(sys.argv[1], 'wb')
try:
for key, value in os.environ.items():
s = '%s=%s\0' % (key, value)
f.write(s.encode('utf-8'))
finally:
f.close()
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ class CrossPlatformDistributionBuilder {
}
zipfileset(dir: "$macDistPath/bin", prefix: "bin", filemode: "775") {
include(name: "restarter*")
include(name: "*.py")
}
zipfileset(dir: "$macDistPath/bin", prefix: "bin/mac", filemode: "775") {
include(name: "fsnotifier*")
Expand Down

0 comments on commit 92ea85e

Please sign in to comment.