From a247734e8803d15ddc98a7434273b8c885fbf611 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Wed, 10 Jun 2015 22:46:36 +0100 Subject: build/release/docs: properly name directory inside archive --- resources/scripts/helpers/build/release/docs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/resources/scripts/helpers/build/release/docs b/resources/scripts/helpers/build/release/docs index 410e8fae..82a943b0 100755 --- a/resources/scripts/helpers/build/release/docs +++ b/resources/scripts/helpers/build/release/docs @@ -33,16 +33,23 @@ else version="$(git describe --tags HEAD)" fi versiondir="release/${version}" -distdir="${versiondir}/libreboot_${version}_docs" +distname="libreboot_${version}_docs" +distdir="${versiondir}/${distname}" [ -d "${versiondir}/" ] || mkdir -p "${versiondir}/" printf 'Deleting old documentation release archives\n' rm -f "${distdir}.tar.xz" +rm -Rf "${distdir}/" + +mkdir -p "${distdir}/" +cp -r docs/* "${distdir}/" + +printf '%s\n' "${version}" >"${distdir}/version" -printf '%s\n' "${version}" >"docs/version" printf 'Creating compressed documentation archive at %s\n' "${distdir}.tar.xz" -tar -c "docs/" | xz -9e >"${distdir}.tar.xz" -rm -f "docs/version" +(cd "${versiondir}/" && tar -c "${distname}/" | xz -9e >"${distname}.tar.xz") + +rm -Rf "${distdir}/" printf 'Documentation release archive is stored in %s/\n' "${versiondir}" -- cgit v1.2.3-70-g09d2