Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit 985bc69

Browse files
committed
fix Versions.m4 for HP's "cut"
1 parent 2ea6bf9 commit 985bc69

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build/autotools/Versions.m4

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
BSON_CURRENT_FILE=${srcdir}/VERSION_CURRENT
22
BSON_VERSION=$(cat $BSON_CURRENT_FILE)
3-
BSON_MAJOR_VERSION=$(cut -d- -f1 $BSON_CURRENT_FILE | cut -d. -f1)
4-
BSON_MINOR_VERSION=$(cut -d- -f1 $BSON_CURRENT_FILE | cut -d. -f2)
5-
BSON_MICRO_VERSION=$(cut -d- -f1 $BSON_CURRENT_FILE | cut -d. -f3)
3+
# Ensure newline for "cut" implementations that need it, e.g. HP-UX.
4+
BSON_MAJOR_VERSION=$((cat $BSON_CURRENT_FILE; echo) | cut -d- -f1 | cut -d. -f1)
5+
BSON_MINOR_VERSION=$((cat $BSON_CURRENT_FILE; echo) | cut -d- -f1 | cut -d. -f2)
6+
BSON_MICRO_VERSION=$((cat $BSON_CURRENT_FILE; echo) | cut -d- -f1 | cut -d. -f3)
67
BSON_PRERELEASE_VERSION=$(cut -s -d- -f2 $BSON_CURRENT_FILE)
78
AC_SUBST(BSON_VERSION)
89
AC_SUBST(BSON_MAJOR_VERSION)

0 commit comments

Comments
 (0)