Skip to content

Commit 26d48ec

Browse files
committed
OS X build err support
1 parent 520b615 commit 26d48ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ebook/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/sh
22

3+
SED='sed'
4+
5+
if [ `uname -s` == 'Darwin' ] ; then
6+
SED='gsed'
7+
fi
8+
39
bn="`basename $0`"
410
WORKDIR="$(cd $(dirname $0); pwd -P)"
511

@@ -43,7 +49,7 @@ __METADATA__
4349

4450
mkdir -p $TMP/images
4551
cp -r $WORKDIR/images/* $TMP/images/
46-
ls [0-9]*.html | xargs sed -i "s/png?raw=true/png/g"
52+
ls [0-9]*.html | xargs $SED -i "s/png?raw=true/png/g"
4753

4854
pandoc --reference-links -S --toc -f html -t epub --epub-metadata=metadata.txt --epub-cover-image="$WORKDIR/../images/cover.png" -o "$WORKDIR/../build-web-application-with-golang.epub" `ls [0-9]*.html | sort`
4955

0 commit comments

Comments
 (0)