aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xcompile.py4
2 files changed, 3 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0767e67..d970841 100644
--- a/Makefile
+++ b/Makefile
@@ -13,4 +13,5 @@ polldance-$(VERSION).js: polldance.js
cp polldance.js polldance-$(VERSION).js
polldance-$(VERSION).min.js: polldance-$(VERSION).js
- ./compile.py polldance-$(VERSION).js > polldance-$(VERSION).min.js
+ sed -e "s/DEBUG = true/DEBUG = false/g" polldance-$(VERSION).js | ./compile.py > polldance-$(VERSION).min.js.tmp
+ mv polldance-$(VERSION).min.js.tmp polldance-$(VERSION).min.js
diff --git a/compile.py b/compile.py
index 28247eb..74c06a7 100755
--- a/compile.py
+++ b/compile.py
@@ -5,9 +5,7 @@ import httplib, urllib, sys
# Define the parameters for the POST request and encode them in
# a URL-safe format.
-file = open(sys.argv[1])
-js_code = file.read()
-file.close()
+js_code = sys.stdin.read()
params = urllib.urlencode([
('js_code', js_code),