aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-09-06 06:36:31 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-09-06 06:36:31 +0200
commita1ff44c60859f9fb7e19f1acf691a7274caa0945 (patch)
tree07bc9b188f01473806ab651fe0da72aebe05f840
parent8397093f5324454cf851a3679785eaf21bf9dbc8 (diff)
downloads2i-jekyll-a1ff44c60859f9fb7e19f1acf691a7274caa0945.tar.gz
baseurl fix
-rwxr-xr-xs2i/bin/assemble12
1 files changed, 9 insertions, 3 deletions
diff --git a/s2i/bin/assemble b/s2i/bin/assemble
index c302cee..45c4b4c 100755
--- a/s2i/bin/assemble
+++ b/s2i/bin/assemble
@@ -15,8 +15,8 @@ fi
# Restore artifacts from the previous build (if they exist).
#
if [ "$(ls /tmp/artifacts/ 2>/dev/null)" ]; then
- echo "---> Restoring build artifacts..."
- mv /tmp/artifacts/. ./
+ echo "---> Restoring build artifacts..."
+ mv /tmp/artifacts/. ./
fi
echo "---> Installing application source..."
@@ -32,5 +32,11 @@ if test -f Gemfile; then
else
jekyll build
fi
+if test -f _config.yaml; then
+ base=$(awk '/^baseurl/ { print $2 }' _config.yml | tr -d '"')
+else
+ base=""
+fi
cd _site
-cp -a . /opt/app-root/html
+mkdir -p /opt/app-root/html$base
+cp -a . /opt/app-root/html$base