summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kojevnikov <alexander@kojevnikov.com>2011-02-24 00:19:50 +0800
committerAlexander Kojevnikov <alexander@kojevnikov.com>2011-02-24 00:19:50 +0800
commit954b060590f678d9521abe12811331310f3554d1 (patch)
tree9bcf8506d8c2c38f3d4b3bc489c42f2479652ce1
parent07243d6a153ffe6a51f16b80a174d1b79bcd9665 (diff)
release: Fix extras/make-release under FreeBSD
-rwxr-xr-xextras/make-release17
1 files changed, 14 insertions, 3 deletions
diff --git a/extras/make-release b/extras/make-release
index 7ce5a45d7..fa0efbc4f 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
}