slackbuilds/UNUSED/web/html5-boilerplate/SlackBuild
2020-06-25 11:23:11 +02:00

58 lines
1.1 KiB
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=git$(date +%Y.%m.%d_%H.%M)
BUILD=1
ARCH=$(uname -m)
REPOSITORIES=/home/installs/SlackBuilds/repositories
TAG=gwh
TMP=/tmp/$TAG
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
git pull
)
else
git clone "http://github.com/paulirish/html5-boilerplate.git" $REPOSITORIES/$PRGNAM
fi
)
mkdir -p $PKG/srv/www/htdocs
cp -R $REPOSITORIES/$PRGNAM $PKG/srv/www/htdocs/
find $PKG/srv/www/htdocs -name \.git\* -exec rm -fr {} \;
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (website skeleton)
$PRGNAM:
$PRGNAM: This is a set of files that a front-end developer can use to get started
$PRGNAM: on a website
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://html5boilerplate.com/
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)