57 lines
1.2 KiB
Bash
Executable file
57 lines
1.2 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://learnyousomeerlang.com/ -*.dmg -*.exe +*.txt
|
|
)
|
|
else
|
|
( cd $REPOSITORIES/$PRGNAM
|
|
httrack --update
|
|
)
|
|
fi
|
|
|
|
mkdir -p $PKG$PREFIX/doc/
|
|
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
|
|
rm -fr $PKG$PREFIX/doc/$PRGNAM/hts-*
|
|
|
|
cd $PKG
|
|
mkdir -p install
|
|
cat <<EOF > install/slack-desc
|
|
$PRGNAM: $PRGNAM («Learn you some Erlang» book)
|
|
$PRGNAM:
|
|
$PRGNAM: Oh Hello! Welcome to my guide to Erlang! This guide is intended to be read
|
|
$PRGNAM: by beginners, but if you're average or somewhat advanced you can probably
|
|
$PRGNAM: learn a few things too, especially when we start hitting the OTP chapters!
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM: http://learnyousomeerlang.com/
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
chown -R root:root *
|
|
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|