add 2 new ebooks

Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2012-10-10 11:32:51 +02:00
parent e3701fbb73
commit 0cf8595317
2 changed files with 138 additions and 0 deletions

View file

@ -0,0 +1,69 @@
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
REPOSITORIES=/home/installs/SlackBuilds/repositories
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
mkdir -p $REPOSITORIES/$PRGNAM
( cd $REPOSITORIES/$PRGNAM
httrack http://regex.learncodethehardway.org/ -*.dmg -*.exe +*.txt
)
else
( cd $REPOSITORIES/$PRGNAM
httrack --update
)
fi
mkdir -p $PKG$PREFIX/doc/
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
rm -fr $PKG$PREFIX/doc/$PRGNAM/hts-*
ebook-convert $PKG$PREFIX/doc/$PRGNAM/regex.learncodethehardway.org/book/index.html \
$PKG$PREFIX/doc/$PRGNAM/learnregexthehardway.epub \
--authors="Zed A. Shaw" \
--author-sort="Shaw, Zed A." \
--title="Learn Regex The Hard Way" \
--title-sort="Learn Regex The Hard Way" \
--language=English \
--rating=5 \
--series="Learn Code The Hard Way" \
--series-index=4
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM («Learn Regex the Hard way» book)
$PRGNAM:
$PRGNAM: Zed Shaw REGEX learning book project
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://regex.learncodethehardway.org/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)

View file

@ -0,0 +1,69 @@
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
REPOSITORIES=/home/installs/SlackBuilds/repositories
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
mkdir -p $REPOSITORIES/$PRGNAM
( cd $REPOSITORIES/$PRGNAM
httrack http://sql.learncodethehardway.org/ -*.dmg -*.exe +*.txt
)
else
( cd $REPOSITORIES/$PRGNAM
httrack --update
)
fi
mkdir -p $PKG$PREFIX/doc/
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
rm -fr $PKG$PREFIX/doc/$PRGNAM/hts-*
ebook-convert $PKG$PREFIX/doc/$PRGNAM/sql.learncodethehardway.org/book/index.html \
$PKG$PREFIX/doc/$PRGNAM/learnsqlthehardway.epub \
--authors="Zed A. Shaw" \
--author-sort="Shaw, Zed A." \
--title="Learn Sql The Hard Way" \
--title-sort="Learn Sql The Hard Way" \
--language=English \
--rating=5 \
--series="Learn Code The Hard Way" \
--series-index=4
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM («Learn Sql the Hard way» book)
$PRGNAM:
$PRGNAM: Zed Shaw SQL learning book project
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://sql.learncodethehardway.org/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)