Commit e387c1da authored by Legimet's avatar Legimet
Browse files

New make-calibre helper that replaces quick_start.epub with free version

parent 694045e2
Loading
Loading
Loading
Loading
+126 KiB

File added.

No diff preview for this file type.

+5 −16
Changes for helpers/make-calibre: 5 added lines, 16 removed lines.
Original line number Diff line number Diff line
#!/bin/bash
#!/bin/sh
#
#    Copyright (C) 2015 Andrew M. Lindley <andrew@andrewlindley.co.uk>
#    Copyright (C) 2015  Legimet <legimet.calc@gmail.com>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
@@ -17,24 +17,13 @@
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

VERSION=1
VERSION=2

. ./config

TEMP=$(mktemp -d --tmpdir)
TEMP_EPUB=$(mktemp --tmpdir --suffix=.zip -u)
EPUB="resources/quick_start.epub" 
unzip $EPUB -d $TEMP
sed 's% or <a href="http://www.bookdesigner.org/wordpress/">Book Designer</a>%%' -i  $TEMP/OEBPS/Text/calibre_quick_start_split_007.xhtml
pushd $TEMP
zip --quiet --recurse-paths $TEMP_EPUB .
pushd
mv $TEMP_EPUB $EPUB
chmod 0644 $EPUB
rm -rf $TEMP
cp $DATA/quick_start.epub resources/quick_start.epub

changelog 'Remove steer to non-free software from resources/quick_start.epub
           #5426'
changelog 'Replace quick_start.epub with free version that does not recommend nonfree program, #5426'

compile