2010-12-03 09:08:55 +01:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
|
|
|
VERSION=$(date +"%Y.%m.%d_%H.%M")
|
|
|
|
|
BUILD=1
|
2011-02-17 05:54:04 +01:00
|
|
|
|
|
2010-12-03 09:08:55 +01:00
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
|
2011-02-17 05:54:04 +01:00
|
|
|
|
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: I’ve collected and edited the Let’s 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 *
|
|
|
|
|
|
2011-02-17 05:54:04 +01:00
|
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
2010-12-03 09:08:55 +01:00
|
|
|
|
|