slackbuilds/doc/build-a-javascript-framework/build-a-javascript-framework.SlackBuild

48 lines
956 B
Text
Raw Normal View History

2010-12-03 09:08:55 +01:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
2010-12-03 09:08:55 +01:00
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
2010-12-03 09:08:55 +01:00
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
2010-12-03 09:08:55 +01:00