update binder script to build tarball instead of rpm

This commit is contained in:
Jeffrey Forman 2013-03-21 20:31:50 -04:00
parent 1dc627fd82
commit dfcac75a76
2 changed files with 32 additions and 7 deletions

View File

@ -1,7 +0,0 @@
#!/bin/bash -x
/usr/local/bin/fpm -t deb -s dir -n binder --verbose -v 1.0 \
--package binder_trunk-`date '+%Y%m%d'`_all.deb -a all \
--prefix /opt \
-x '**.git**' \
--url http://github.com/jforman/binder binder/

32
build-tarball.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
if [ -x "`which fpm`" ]; then
echo "FPM found, attempting to build package."
else
echo "Unable to find 'fpm', which is required to build package tarball. See https://github.com/jordansissel/fpm."
exit
fi
if [ -z "$1" ]; then
echo "No version number specified, using date instead as version string."
version=`date "+%Y%m%d"`
else
echo "Package version specified as $1."
version=$1
fi
package_name="binder-$version.tgz"
fpm -s dir -t tar -n binder \
-v $version \
--package $package_name \
-x '**.git**' \
--prefix binder \
.
if [ $? -ne 0 ]; then
echo "fpm executed exited with an error. Package was not built correctly."
exit
fi
echo "Package built as $package_name."