slackbuilds/d/UNUSED/willgit/willgit.SlackBuild
Gwenhael Le Moine 0da671b6e8 big spring cleanup, putting aside currently unused scripts
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2013-03-25 22:41:45 +01:00

66 lines
1.3 KiB
Bash
Executable file

#!/bin/sh -x
# variables
TAG=cyco
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
VERSION=$(date +%Y.%m.%d_%H.%M)
ARCH=noarch
BUILD=1
PREFIX=/usr
REPOSITORIES=/home/installs/SlackBuilds/repositories
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG$PREFIX/{bin/,doc/}
# mise en place
cd $TMP
if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
mkdir -p $REPOSITORIES
( cd $REPOSITORIES
git clone http://git.gitorious.org/willgit/mainline.git $PRGNAM
)
else
( cd $REPOSITORIES/$PRGNAM
git pull
)
fi
# installation
cp -R $REPOSITORIES/$PRGNAM/bin/* $PKG$PREFIX/bin/
cp -R $REPOSITORIES/$PRGNAM/www/ $PKG$PREFIX/doc/$PRGNAM
chmod +x $PKG$PREFIX/bin/*
# correction
cd $PKG
chown -R root:root *
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (William's Miscellaneous Git Tools)
$PRGNAM:
$PRGNAM: A bunch of random git-related tools I've found useful at some point,
$PRGNAM: mostly for managing feature branches.
$PRGNAM:
$PRGNAM: Includes such greatest hits as: git-wtf, git-show-merges,
$PRGNAM: git-publish-branch, and git-rank-contributors.
$PRGNAM:
$PRGNAM:
$PRGNAM: http://gitorious.org/willgit
$PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz