From 47f3e68169aac31dd0e7bd44c9b884190a61e9ef Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Thu, 17 Dec 2020 16:04:29 +0300 Subject: [PATCH] Extract version from CMakeLists.txt in update-version-h.sh Since autotools build system was removed, configure.ac is no longer available while the script is still being used by the Xcode project. Fixes: #1553 --- update-version-h.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update-version-h.sh b/update-version-h.sh index d5fcf61dd..d547ceb1c 100755 --- a/update-version-h.sh +++ b/update-version-h.sh @@ -12,9 +12,9 @@ replace_if_differs() { echo "creating libtransmission/version.h" -user_agent_prefix=$(grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep user_agent_prefix | cut -d , -f 6) +user_agent_prefix=$(grep 'set[(]TR_USER_AGENT_PREFIX' CMakeLists.txt | cut -d \" -f 2) -peer_id_prefix=$(grep m4_define configure.ac | sed "s/[][)(]/,/g" | grep peer_id_prefix | cut -d , -f 6) +peer_id_prefix=$(grep 'set[(]TR_PEER_ID_PREFIX' CMakeLists.txt | cut -d \" -f 2) major_version=$(echo "${user_agent_prefix}" | awk -F . '{print $1}') minor_version=$(echo "${user_agent_prefix}" | awk -F . '{print $2 + 0}')