summaryrefslogtreecommitdiff
path: root/maintainer
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-03-31 20:12:54 (GMT)
committerAlexey Neyman <stilor@att.net>2018-04-07 19:03:17 (GMT)
commit56d785bd006ab823caf39fc16e2ae6833ef2d780 (patch)
tree3ed15bae8f6157da10e99a09bda4ad65f32ff628 /maintainer
parentd6f5c308f9b9564df548d7d6a245a56dbf5360bc (diff)
Docs installation
- Move downloading the pages from a website to a separate script, invoke as dist hook - Install manpage Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'maintainer')
-rwxr-xr-xmaintainer/create-release.sh33
-rwxr-xr-xmaintainer/download-docs.sh35
2 files changed, 35 insertions, 33 deletions
diff --git a/maintainer/create-release.sh b/maintainer/create-release.sh
index 6aa4cc8..498fc0a 100755
--- a/maintainer/create-release.sh
+++ b/maintainer/create-release.sh
@@ -1,8 +1,5 @@
#!/bin/bash
-# Configurable portions
-docs_git=https://github.com/crosstool-ng/crosstool-ng.github.io.git
-docs_subdir=_pages/docs
formats=( "bz2" "xz" )
declare -A tar_opt=( ["bz2"]=j ["xz"]=J )
digests=( md5 sha1 sha512 )
@@ -43,39 +40,9 @@ do_trace "Copying crosstool-NG"
rm -rf "release/${version}"
git archive --prefix="${version}/" HEAD | tar xf - -C "release"
-# Clone a repository for docs. Github does not support 'git archive --remote='.
-do_trace "Checking out docs"
-rm -rf "release/site"
-git clone --depth=1 "${docs_git}" "release/site"
-
# The rest of modifications are inside the release directory
cd "release/${version}"
-# Copy the docs instead of the MANUAL_ONLINE placeholder
-do_trace "Replacing docs"
-rm "docs/MANUAL_ONLINE"
-mkdir -p "docs/manual"
-for i in "../site/${docs_subdir}/"*.md; do
- awk '
-BEGIN { skip=0; }
- {
- if ($0=="---") {
- if (NR==1) {
- skip=1
- next
- }
- else if (skip) {
- skip=0
- next
- }
- }
- if (!skip) {
- print $0
- }
- }
-' < "${i}" > "docs/manual/${i##*/}"
-done
-
# Run bootstrap before it is removed
do_trace "Bootstrapping"
./bootstrap
diff --git a/maintainer/download-docs.sh b/maintainer/download-docs.sh
new file mode 100755
index 0000000..5ef3c6a
--- /dev/null
+++ b/maintainer/download-docs.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+distdir=${1:-.}
+
+# Configurable portions
+docs_git=https://github.com/crosstool-ng/crosstool-ng.github.io.git
+docs_subdir=_pages/docs
+
+# Clone a repository for docs. Github does not support 'git archive --remote='.
+set -ex
+git clone --depth=1 "${docs_git}" "${distdir}/site-docs"
+
+# Copy the docs instead of the MANUAL_ONLINE placeholder
+mkdir -p "${distdir}/docs/manual"
+for i in "${distdir}/site-docs/${docs_subdir}/"*.md; do
+ awk '
+BEGIN { skip=0; }
+ {
+ if ($0=="---") {
+ if (NR==1) {
+ skip=1
+ next
+ }
+ else if (skip) {
+ skip=0
+ next
+ }
+ }
+ if (!skip) {
+ print $0
+ }
+ }
+' < "${i}" > "${distdir}/docs/manual/${i##*/}"
+done
+rm -rf "${distdir}/site-docs"