slackbuilds/d/willgit/willgit.SlackBuild

67 lines
1.3 KiB
Text
Raw Normal View History

#!/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<70>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 https://git.gitorious.org/willgit/mainline.git $PRGNAM
)
else
( cd $REPOSITORIES/$PRGNAM
git pull
)
fi
# installation
cp -R $REPOSITORIES/$PRGNAM/bin/* $PKG$PREFIX/bin/
2011-11-15 11:39:21 +01:00
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