[banshee] release: Fix extras/make-release under FreeBSD



commit 954b060590f678d9521abe12811331310f3554d1
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Thu Feb 24 00:19:50 2011 +0800

    release: Fix extras/make-release under FreeBSD

 extras/make-release |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/extras/make-release b/extras/make-release
index 7ce5a45..fa0efbc 100755
--- a/extras/make-release
+++ b/extras/make-release
@@ -28,6 +28,17 @@ RELEASE_RC_FILE="release-rc"
 [[ -z "${PACKAGE_NAME}" || -z "${PACKAGE_VERSION}" ]] \
 	&& bail "Could not figure out package information. Do you have a configure?"
 
+case "$(uname)" in
+    FreeBSD)
+        MAKE=gmake
+        SHA256="sha256 -r"
+        ;;
+    *)
+        MAKE=make
+        SHA256=sha256sum
+        ;;
+esac
+
 cat <<EOF
 Release Summary
 
@@ -71,7 +82,7 @@ function run_hook () {
 
 function distcheck () {
 	preparing_to "make distcheck"
-	make distcheck || bail "distcheck failed"
+	$MAKE distcheck || bail "distcheck failed"
 }
 
 function prepare_upload () {
@@ -80,7 +91,7 @@ function prepare_upload () {
 	rm -rf release-data
 	mkdir release-data || bail "Could not create release directory"
 
-	find -maxdepth 1 \( \
+	find . -maxdepth 1 \( \
 		-name \*.zip -o \
 		-name \*.bz2 -o \
 		-name \*.gz -o \
@@ -91,7 +102,7 @@ function prepare_upload () {
 		|| bail "Could not copy NEWS file"
 
 	(cd release-data && {
-		sha256sum * > ${PACKAGE_NAME}-${PACKAGE_VERSION}.sha256sum \
+		$SHA256 * > ${PACKAGE_NAME}-${PACKAGE_VERSION}.sha256sum \
 			|| bail "Could not sha256sum the release files"
 	}) || exit 1
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]