slackbuilds/doc/build-a-javascript-framework/build-a-javascript-framework.SlackBuild
Gwenhael Le Moine 2d3c96f8e7 replace TMP by OUTPUT
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-02-17 11:54:04 +07:00

47 lines
956 B
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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
PREFIX=/usr
# cleaning
rm -fr $PKG
mkdir -p $PKG$PREFIX/doc/$PRGNAM
for fmt in pdf epub mobi ; do
[ -e $CWD/$PRGNAM.$fmt ] && mv $CWD/$PRGNAM.$fmt $CWD/$PRGNAM.$fmt.orig
wget -c http://dailyjs.com/files/$PRGNAM.$fmt -O $CWD/$PRGNAM.$fmt
cp $CWD/$PRGNAM.$fmt $PKG$PREFIX/doc/$PRGNAM
done
cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (Let's Make a Framework: Free eBook)
$PRGNAM:
$PRGNAM: Ive collected and edited the Lets Make a Framework articles into a book
$PRGNAM: that suitable for e-readers. Consider this a Christmas present!
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://dailyjs.com/2010/12/02/framework-review/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz