slackbuilds/doc/build-a-javascript-framework/build-a-javascript-framework.SlackBuild
Gwenhael Le Moine ea364c46bd add
2010-12-03 15:08:55 +07:00

46 lines
970 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
PACKAGER=cyco
ARCH=$(uname -m)
TMP=/tmp/$PACKAGER
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$PACKAGER.txz