slackbuilds/doc/learnpythonthehardway/learnpythonthehardway.SlackBuild

48 lines
922 B
Text
Raw Normal View History

2010-04-28 05:09:36 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
2010-04-28 05:09:36 +02:00
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
2010-04-28 05:09:36 +02:00
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
[ -e $CWD/LearnPythonTheHardWay.pdf ] && mv $CWD/LearnPythonTheHardWay.pdf $CWD/LearnPythonTheHardWay.pdf.orig
2010-09-29 15:49:56 +02:00
wget -c http://learnpythonthehardway.org/static/LearnPythonTheHardWay.pdf -O $CWD/LearnPythonTheHardWay.pdf
2010-04-28 05:09:36 +02:00
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R $CWD/LearnPythonTheHardWay.pdf $PKG$PREFIX/doc/$PRGNAM
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM («Learn Python the Hard way» book)
$PRGNAM:
$PRGNAM: Zed Shaw Python learning book project
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://learnpythonthehardway.com/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
2010-04-28 05:09:36 +02:00
)