Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2019-08-22 13:43:33 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2019-08-22 13:43:33 +0300
commit6bd9a01ae4c3232386cc56cdf3607d8d58ec5120 (patch)
treef2e8d084b34671961bef25ebb69a61f2281f64b8 /scripts
parent2f15513e46c57fbf02e93dbaa8b4ff9c79d46620 (diff)
Port CE symlink to Dockerfiles
This ports all the work of https://gitlab.com/gitlab-org/gitlab-docs/merge_requests/520 to the Dockerfiles, so that this can be applied to all versions.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/normalize-links.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/normalize-links.sh b/scripts/normalize-links.sh
index 6189d5bf..3d83ce37 100755
--- a/scripts/normalize-links.sh
+++ b/scripts/normalize-links.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-TARGET="$1"
-VER="$2"
+TARGET="$1" # usually /site, the directory that has all the HTML files including versions
+VER="$2" # the docs version
if [ -z "$TARGET" ]; then
echo "Usage: $0 <target> <version>"
@@ -32,3 +32,7 @@ find ${TARGET} -type f -name 'sitemap.xml' -print0 | xargs -0 sed -i 's#docs.git
# Symlink all README.html to index.html
for i in `find ${TARGET}/${VER} -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done
+
+# Remove CE dir and symlink EE to CE
+# https://gitlab.com/gitlab-org/gitlab-docs/issues/418
+if [ -d "${TARGET}/${VER}/ce/" ]; then cd ${TARGET}/${VER} && rm -r ce && ln -s ee ce; fi