Skip to content

Commit 3332d95

Browse files
authored
Update maketgz for macOS (libssh2#543)
File: maketgz Notes: Fix error on macOS: sed: -e: No such file or directory Credit: cntrump
1 parent a77ca0f commit 3332d95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

maketgz

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ fi
3737
datestamp=`LC_TIME=C date -u`
3838

3939
# Replace in-place version number in header file:
40-
sed -i -e 's/^#define LIBSSH2_VERSION .*/#define LIBSSH2_VERSION "'$libversion'"/g' \
40+
sed -i.bak -e 's/^#define LIBSSH2_VERSION .*/#define LIBSSH2_VERSION "'$libversion'"/g' \
4141
-e 's/^#define LIBSSH2_VERSION_NUM .*/#define LIBSSH2_VERSION_NUM 0x'$numeric'/g' \
4242
-e 's/^#define LIBSSH2_VERSION_MAJOR .*/#define LIBSSH2_VERSION_MAJOR '$major'/g' \
4343
-e 's/^#define LIBSSH2_VERSION_MINOR .*/#define LIBSSH2_VERSION_MINOR '$minor'/g' \
4444
-e 's/^#define LIBSSH2_VERSION_PATCH .*/#define LIBSSH2_VERSION_PATCH '$patch'/g' \
4545
-e "s/^#define LIBSSH2_TIMESTAMP .*/#define LIBSSH2_TIMESTAMP \"$datestamp\"/g" \
4646
$HEADER
4747

48+
rm -f "$HEADER.bak"
49+
4850
echo "libssh2 version $libversion"
4951
echo "libssh2 numerical $numeric"
5052
echo "datestamp $datestamp"

0 commit comments

Comments
 (0)