#!/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=cyco TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp PREFIX=/usr function pull_or_clone() { NAM=$1 if [ -e $REPOSITORIES/$NAM ] ; then ( cd $REPOSITORIES/$NAM git pull ) else git clone https://github.com/rightjs/$NAM.git $REPOSITORIES/$NAM fi } # cleaning rm -fr $PKG # get sources [ ! -e $REPOSITORIES ] && mkdir -p $REPOSITORIES ( cd $REPOSITORIES pull_or_clone rightjs-core pull_or_clone rightjs-ui pull_or_clone rightjs-goods pull_or_clone rightjs-home ) mkdir -p $PKG/srv/www/htdocs/$PRGNAM cp -R $REPOSITORIES/rightjs-core $PKG/srv/www/htdocs/$PRGNAM cp -R $REPOSITORIES/rightjs-ui $PKG/srv/www/htdocs/$PRGNAM cp -R $REPOSITORIES/rightjs-goods $PKG/srv/www/htdocs/$PRGNAM cp -R $REPOSITORIES/rightjs-home $PKG/srv/www/htdocs/$PRGNAM find $PKG/srv/www/htdocs -name \.git\* -exec rm -fr {} \; ( cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM (The Right JavaScript Framework) $PRGNAM: $PRGNAM: RightJS is a new JavaScript framework. It takes many old, battle proven $PRGNAM: features, wraps them nicely, mixes with some new ideas and features, $PRGNAM: and as the result provides a tiny, fast and easy to use tool. $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://rightjs.org/ $PRGNAM: EOF chown -R root:root * makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz )