From e71db2bd58d1abdc6658db82642d9c614e9de2ec Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Thu, 23 Apr 2020 17:00:19 +0200 Subject: Fix version computing when LIVE_BUILD is set It used to rely on the $LIVE_BUILD/VERSION file which is now gone. Instead we now rely on the debian/changelog file just like we do in the Makefile. --- functions/common.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/functions/common.sh b/functions/common.sh index 3071c9a73..edfd4ef58 100755 --- a/functions/common.sh +++ b/functions/common.sh @@ -11,10 +11,8 @@ PROGRAM_NAME="live-build" PROGRAM="lb" -VERSION="$(if [ -e ${LIVE_BUILD}/VERSION ]; then cat ${LIVE_BUILD}/VERSION; else cat /usr/share/live/build/VERSION; fi)" -CONFIG_VERSION="$(echo ${VERSION} | awk -F- '{ print $1 }')" +VERSION="$(if [ -e ${LIVE_BUILD}/debian/changelog ]; then sed -e 's/.*(\(.*\)).*/\1/; s/^[0-9]://; q' ${LIVE_BUILD}/debian/changelog; else cat /usr/share/live/build/VERSION; fi)" -# FIXME -LIVE_BUILD_VERSION="${CONFIG_VERSION}" +LIVE_BUILD_VERSION="${VERSION}" PATH="${PWD}/local/bin:${PATH}" -- cgit v1.2.3