1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 01:47:59 +01:00

Check for existence of base64(1) before 'make dist'

This commit is contained in:
Kris Maglione
2009-11-02 16:49:52 -05:00
parent 108f467fe4
commit 8224540d26
2 changed files with 11 additions and 7 deletions

View File

@@ -38,6 +38,7 @@ BUILD_DIR = build.$(VERSION).$(OS)
AWK = awk
CURL = curl
B64ENCODE = base64
.SILENT:
@@ -79,6 +80,9 @@ release: $(XPI) $(RDF)
# This is not for you!
dist: $(XPI)
@echo DIST $(XPI) $(GOOGLE)
set -e; \
which $$(echo $(B64ENCODE) | $(AWK) '{print $1}') >/dev/null; \
\
proj=$$(echo -n $(NAME) | sed 's/\(.\).*/\1/' | tr a-z A-Z); \
proj="$$proj$$(echo $(NAME) | sed 's/.//')"; \
[ -z "$$summary" ] && summary="$$proj $(VERSION) Release"; \
@@ -90,7 +94,7 @@ dist: $(XPI)
done; \
$(CURL) "$$@" --form-string "summary=$$summary" \
-F "filename=@$(XPI)" \
-H "Authorization: Basic $$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | base64)" \
-H "Authorization: Basic $$(echo -n "$(GOOGLE_USER):$(GOOGLE_PASS)" | $(B64ENCODE))" \
-i "$(GOOGLE)" | sed -n '/^Location/{p;q}'
$(RDF): $(RDF_IN) Makefile

View File

@@ -328,14 +328,14 @@ const util = { //{{{
zip.open(FILE.file, io.MODE_CREATE | io.MODE_WRONLY | io.MODE_TRUNCATE);
function addURIEntry(file, uri)
zip.addEntryChannel(PATH + file, TIME, 9,
services.get("io").newChannel(uri, null, null),
false);
services.get("io").newChannel(uri, null, null), false);
function addDataEntry(file, data) // Inideal to an extreme.
addURIEntry(file, "data:text/plain;charset=UTF-8," + encodeURI(data));
let empty = util.Array.toObject(
"area base basefont br col frame hr img input isindex link meta param"
.split(" ").map(Array.concat));
let chrome = {};
for (let [file,] in Iterator(services.get("liberator:").FILE_MAP))
{
@@ -420,10 +420,10 @@ const util = { //{{{
},
/**
* Sends a synchronous HTTP request to <b>url</b> and returns the
* XMLHttpRequest object. If <b>callback</b> is specified the request is
* asynchronous and the <b>callback</b> is invoked with the object as its
* argument.
* Sends a synchronous or asynchronous HTTP request to <b>url</b> and
* returns the XMLHttpRequest object. If <b>callback</b> is specified the
* request is asynchronous and the <b>callback</b> is invoked with the
* object as its argument.
*
* @param {string} url
* @param {function(XMLHttpRequest)} callback