slackbuilds/doc/Scala-school/SlackBuild

58 lines
1.3 KiB
Text
Raw Normal View History

2011-09-21 07:26:46 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
REPOSITORIES=/home/installs/SlackBuilds/repositories
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
mkdir -p $REPOSITORIES/$PRGNAM
( cd $REPOSITORIES/$PRGNAM
httrack http://twitter.github.com/scala_school/ -*.dmg -*.exe +*.txt
)
else
( cd $REPOSITORIES/$PRGNAM
httrack --update
)
fi
mkdir -p $PKG$PREFIX/doc/
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM («Scala school» book)
$PRGNAM:
$PRGNAM: Scala school was started as a series of lectures at Twitter to prepare
$PRGNAM: experienced engineers to be productive Scala programmers. Being a
$PRGNAM: relatively new language, but also one that draws on many familiar
$PRGNAM: concepts, we found this an effective way of getting new engineers up to
$PRGNAM: speed quickly. This is the written material that accompanied those
$PRGNAM: lectures. We have found that these are useful in their own right.
$PRGNAM:
$PRGNAM: http://twitter.github.com/scala_school/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)