Skip to content

Commit 1afbfc4

Browse files
committed
fix for bsd/linux sed incompat
1 parent 71506f9 commit 1afbfc4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ endif
3535
# When no build target is specified, all gets ran
3636
all: css js zip notify
3737

38-
clean:
38+
clean:
3939
# -------------------------------------------------
4040
# Cleaning build output
4141
@@rm -rf ${OUTPUT}
4242
@@rm -rf tmp
4343

44-
# Create the output directory.
44+
# Create the output directory.
4545
init:
4646
@@mkdir -p ${OUTPUT}
4747

@@ -96,7 +96,11 @@ docs: init
9696
@@cat tmp/demos/LICENSE-INFO.txt | cat - tmp/demos/css/themes/default/${NAME}.css > tmp/demos/css/themes/default/${NAME}.css.tmp
9797
@@mv tmp/demos/css/themes/default/${NAME}.css.tmp tmp/demos/css/themes/default/${NAME}.css
9898
# ... replace "js/" with "js/jquery.mobile.docs.js"
99-
@@find tmp/demos -name "*.html" -exec sed -i 's@js/"@js/jquery.mobile.docs.js"@' {} \;
99+
# NOTE the deletion here is required by the outdated version of sed
100+
# on osx since it parses the inplace backup extension differently
101+
# than the linux version
102+
@@find tmp/demos -name "*.html" -exec sed -iwhyunowork -e 's@js/"@js/jquery.mobile.docs.js"@' {} \;
103+
@@find tmp/demos -name "*whyunowork" -exec rm {} \;
100104
# ... Move and zip up the the whole folder
101105
@@rm -f ${OUTPUT}/${NAME}.docs.zip
102106
@@cd tmp/demos && rm -f *.php && rm -f Makefile

0 commit comments

Comments
 (0)