From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 7/8] make.sh: Cleanup code that builds ${SYSTEM_RELEASE} Date: Tue, 11 Feb 2020 14:28:52 +0000 Message-ID: <20200211142853.8561-8-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5266489632409884109==" List-Id: --===============5266489632409884109== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- make.sh | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/make.sh b/make.sh index ba393bd65..d46282b8e 100755 --- a/make.sh +++ b/make.sh @@ -509,21 +509,25 @@ prepareenv() { rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null =20 # Prepare string for /etc/system-release. - SYSTEM_RELEASE=3D"${NAME} ${VERSION} (${BUILD_ARCH})" - if [ "$(git status -s | wc -l)" =3D=3D "0" ]; then - GIT_STATUS=3D"" - else - GIT_STATUS=3D"-dirty" - fi - case "$GIT_BRANCH" in - core*|beta?|rc?) - SYSTEM_RELEASE=3D"${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" - ;; - *) - SYSTEM_RELEASE=3D"${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/${GIT= _LASTCOMMIT:0:8}$GIT_STATUS" - ;; + local system_release=3D"${NAME} ${VERSION} (${BUILD_ARCH})" + + case "${GIT_BRANCH}" in + core*|beta?|rc?) + system_release=3D"${system_release} - ${GIT_BRANCH}" + ;; + *) + system_release=3D"${system_release} - Development Build: ${GIT_BRANCH}/${= GIT_LASTCOMMIT:0:8}" + ;; esac =20 + # Append -dirty tag for local changes + if [ "$(git status -s | wc -l)" !=3D "0" ]; then + system_release=3D"${system_release}-dirty" + fi + + # Export variable + SYSTEM_RELEASE=3D"${system_release}" + # Setup ccache cache size enterchroot ccache --max-size=3D"${CCACHE_CACHE_SIZE}" >/dev/null } --=20 2.20.1 --===============5266489632409884109==--