slackbuilds/doc/Scala-school/SlackBuild
Gwenhael Le Moine e181ecf65d
generic name for SlackBuild scripts
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2018-03-14 09:35:32 +01:00

57 lines
1.3 KiB
Bash
Executable file

#!/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
)