2007-05-23 13:34:38 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-05-23 17:03:48 +01:00
|
|
|
BUILDER=./build-arch-tag
|
|
|
|
|
2007-10-08 13:27:53 +01:00
|
|
|
# Current
|
|
|
|
DESCR=`git describe --tags`
|
|
|
|
|
2007-05-23 13:34:38 +01:00
|
|
|
# Check whether the tag exists
|
|
|
|
TAG=$1
|
|
|
|
if [ "x$TAG" != "x" ]
|
|
|
|
then
|
2007-10-08 13:41:17 +01:00
|
|
|
FOUND=`git rev-parse $TAG`
|
2007-10-08 13:37:50 +01:00
|
|
|
if [ "$?" -eq 0 ]
|
2007-05-23 13:34:38 +01:00
|
|
|
then
|
|
|
|
echo "Tag $TAG found."
|
|
|
|
else
|
|
|
|
TAG=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "x$TAG" = "x" ]
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo "Scyther binary distribution generator."
|
|
|
|
echo
|
|
|
|
echo " Usage: $0 <tag>"
|
|
|
|
echo
|
|
|
|
echo "Don't know tag $TAG, please select one from below:"
|
2008-09-10 10:20:50 +01:00
|
|
|
git tag -l
|
2007-10-08 13:27:53 +01:00
|
|
|
echo $DESCR
|
2007-05-23 13:34:38 +01:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Determine system and build accordingly
|
|
|
|
OS=`uname -s`
|
|
|
|
if [ "x$OS" = "xDarwin" ]
|
|
|
|
then
|
2007-05-23 17:03:48 +01:00
|
|
|
$BUILDER mac $TAG
|
2007-05-23 13:34:38 +01:00
|
|
|
elif [ "x$OS" = "xLinux" ]
|
|
|
|
then
|
2007-05-23 17:03:48 +01:00
|
|
|
$BUILDER linux $TAG
|
|
|
|
$BUILDER w32 $TAG
|
2007-05-23 13:34:38 +01:00
|
|
|
else
|
|
|
|
echo "Don't know architecture $OS, where am I?"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|