Skip to content

Commit 56cf4b3

Browse files
stvnwmaxauthority
authored andcommitted
Fix #648: make xpi doesn't work (#649)
* Fix #648: make xpi doesn't work * Supply arguments to sed in Makefile more compatibly Having an explicit empty string argument to sed’s '-i' option prevents subsequent tokens from being mis-interpreted on the BSD flavour of sed where the argument to '-i' is non-optional. BSD is flexible about whitespace between the option and its argument but GNU allows none, so cater to the latter by using sed -i''. More properly fixes #648
1 parent cb86318 commit 56cf4b3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

common/Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ xpi:
9393

9494
# Remove existing locale entries from the manifest file
9595
for locale in $(SUPPORTED_LOCALES); do \
96-
sed -i -e "/$$locale/d" $(XPI_PATH)/chrome.manifest; \
96+
sed -i'' -e "/$$locale/d" $(XPI_PATH)/chrome.manifest; \
9797
done
9898

9999
# Package up locale specific documentation files
@@ -116,21 +116,21 @@ xpi:
116116
done
117117

118118
# Update locale paths in manifest file
119-
sed -i -e 's# ./locale/# locale/#' $(XPI_PATH)/chrome.manifest
120-
sed -i -e 's#../common/#common/#' $(XPI_PATH)/chrome.manifest
119+
sed -i'' -e 's# ./locale/# locale/#' $(XPI_PATH)/chrome.manifest
120+
sed -i'' -e 's#../common/#common/#' $(XPI_PATH)/chrome.manifest
121121

122122
@echo "Replacing UUID, VERSION, DATE and UPDATEURL tags"
123123
for file in `grep -rl -e "###UUID###" -e "###VERSION###" -e "###DATE###" $(XPI_PATH)` $(UPD_RDF_PATH); do \
124-
sed -i -e "s,###UUID###,$(UUID),g" $${file}; \
125-
sed -i -e "s,###VERSION###,$(VERSION),g" $${file}; \
126-
sed -i -e "s,###MINVERSION###,$(MIN_VERSION),g" $${file}; \
127-
sed -i -e "s,###MAXVERSION###,$(MAX_VERSION),g" $${file}; \
128-
sed -i -e "s,###DATE###,$(BUILD_DATE),g" $${file}; \
129-
sed -i -e "s,###UPDATEXPI###,$(UPDATE_URL_XPI),g" $${file}; \
124+
sed -i'' -e "s,###UUID###,$(UUID),g" $${file}; \
125+
sed -i'' -e "s,###VERSION###,$(VERSION),g" $${file}; \
126+
sed -i'' -e "s,###MINVERSION###,$(MIN_VERSION),g" $${file}; \
127+
sed -i'' -e "s,###MAXVERSION###,$(MAX_VERSION),g" $${file}; \
128+
sed -i'' -e "s,###DATE###,$(BUILD_DATE),g" $${file}; \
129+
sed -i'' -e "s,###UPDATEXPI###,$(UPDATE_URL_XPI),g" $${file}; \
130130
if [ -n "$(UPDATE_URL)" ]; then \
131-
sed -i -e "s,###UPDATEURL###,$(UPDATE_URL),g" $${file}; \
131+
sed -i'' -e "s,###UPDATEURL###,$(UPDATE_URL),g" $${file}; \
132132
else \
133-
sed -i "/###UPDATEURL###/d" $${file}; \
133+
sed -i'' -e "/###UPDATEURL###/d" $${file}; \
134134
fi; \
135135
done
136136

0 commit comments

Comments
 (0)