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.
This commit is contained in:
Raphaël Hertzog 2020-04-23 17:00:19 +02:00
parent 6f7446fa89
commit e71db2bd58
1 changed files with 2 additions and 4 deletions

View File

@ -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}"