aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts/helpers/build
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-06-10 22:46:36 +0100
committerFrancis Rowe <info@gluglug.org.uk>2015-06-10 22:46:36 +0100
commita247734e8803d15ddc98a7434273b8c885fbf611 (patch)
tree7d05c4b73d792fc41f030e1185bc38a51a14200f /resources/scripts/helpers/build
parentf2e609fd287c05fbce18f57f415a19feafc1b291 (diff)
downloadlibrebootfr-a247734e8803d15ddc98a7434273b8c885fbf611.tar.gz
librebootfr-a247734e8803d15ddc98a7434273b8c885fbf611.zip
build/release/docs: properly name directory inside archive
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 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}"