slackbuilds/doc/python-3-patterns-idioms/SlackBuild

59 lines
1.1 KiB
Text
Raw Normal View History

2010-10-24 05:07:30 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
2010-10-24 05:07:30 +02:00
ARCH=$(uname -m)
2011-07-22 08:41:46 +02:00
REPOSITORIES=/home/installs/SlackBuilds/repositories
2010-10-24 05:07:30 +02:00
TAG=cyco
TMP=/tmp/$TAG
2010-10-24 05:07:30 +02:00
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
[ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES
( cd $REPOSITORIES
if [ -e $REPOSITORIES/$PRGNAM ] ; then
( cd $REPOSITORIES/$PRGNAM
2010-10-24 05:14:59 +02:00
hg pull --update
2010-10-24 05:07:30 +02:00
)
else
hg clone http://bitbucket.org/BruceEckel/python-3-patterns-idioms $REPOSITORIES/$PRGNAM
fi
)
mkdir -p $PKG$PREFIX/doc/
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
2010-10-24 05:14:59 +02:00
find $PKG$PREFIX/doc/$PRGNAM -name \.DS\* -o -name \.hg\* -exec rm -fr {} \;
2010-10-24 05:07:30 +02:00
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (Python 3 book)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://www.mindviewinc.com/Books/Python3Patterns/Index.php
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
2010-10-24 05:07:30 +02:00
)