From dfcac75a7652f479db316425da7a8b72b7a828b9 Mon Sep 17 00:00:00 2001 From: Jeffrey Forman Date: Thu, 21 Mar 2013 20:31:50 -0400 Subject: [PATCH] update binder script to build tarball instead of rpm --- build-binder.sh | 7 ------- build-tarball.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) delete mode 100755 build-binder.sh create mode 100755 build-tarball.sh diff --git a/build-binder.sh b/build-binder.sh deleted file mode 100755 index 9d2ed8e..0000000 --- a/build-binder.sh +++ /dev/null @@ -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/ \ No newline at end of file diff --git a/build-tarball.sh b/build-tarball.sh new file mode 100755 index 0000000..1fbf10d --- /dev/null +++ b/build-tarball.sh @@ -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."