add web/right.js

Signed-off-by: Gwenhael Le Moine <cycojesus@darkstar.example.net>
This commit is contained in:
Gwenhael Le Moine 2009-12-22 17:27:34 +07:00
parent a96792ea85
commit d7f4525c1b

View file

@ -0,0 +1,69 @@
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=git$(date +%F | tr -d -)
BUILD=1
PACKAGER=cyco
ARCH=$(uname -m)
REPOSITORIES=/home/cycojesus/projets/packages/repositories
TMP=/tmp/$PACKAGER
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 git://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 <<EOF > 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$PACKAGER.txz
)