summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/build
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/build')
-rwxr-xr-xresources/scripts/helpers/build/release/docs15
1 files changed, 11 insertions, 4 deletions
diff --git a/resources/scripts/helpers/build/release/docs b/resources/scripts/helpers/build/release/docs
index 410e8fa..82a943b 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}"