From 47089773198ea67149e5399a526436076988ede2 Mon Sep 17 00:00:00 2001 From: maxsteciuk Date: Sun, 7 Oct 2018 13:24:25 -0400 Subject: [PATCH] Fixed issue of creating ISO from current working directory of trident-build checkout when ./artifact-iso is not found due to relative [path being used after script cd'ed into release/ directory --- build-distro.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build-distro.sh b/build-distro.sh index 976d67c..b7e5aac 100755 --- a/build-distro.sh +++ b/build-distro.sh @@ -76,7 +76,13 @@ if [ -n "${WORKSPACE}" ] ; then PKG_RELEASE_BASE="${WORKSPACE}/artifact-pkg-base" else #Create/use an artifacts dir in the current dir - ARTIFACTS_DIR="${CURDIR}/artifact-iso" + if [ $CURDIR == "." ] ; then + artifactDir=`readlink -f $CURDIR` + else + artifactDir="$CURDIR" + fi + ARTIFACTS_DIR="${artifactDir}/artifact-iso" + PKG_RELEASE_PORTS="${CURDIR}/artifact-pkg" PKG_RELEASE_BASE="${CURDIR}/artifact-pkg-base" fi @@ -471,6 +477,7 @@ make_release(){ else ISOBASE=`basename -s ".json" "${TRUEOS_MANIFEST}"` fi + local ISONAME="${ISOBASE}-${CURDATE}" #Remove old artifacts (if any) @@ -488,6 +495,7 @@ make_release(){ rm *.iso fi cd "${BASEDIR}/release" + make release if [ $? -eq 0 ] ; then cd "${INTERNAL_RELEASE_DIR}"