slackbuilds/doc/YourVietnamese.com/SlackBuild
2020-06-25 11:23:11 +02:00

57 lines
921 B
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
ARCH=$(uname -m)
TAG=gwh
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://yourvietnamese.com/
)
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 («Learn Vietnamese Your Way» book)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://yourvietnamese.com/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)