Commit c38ddf78 authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel 💬
Browse files

adapt project paths

parent fedca1aa
Pipeline #116681 passed with stages
in 51 seconds
......@@ -14,3 +14,6 @@ public/*
*.swp
!*ref_*
*tmp*
*.gif
testing/*/*
www3-dev
......@@ -194,7 +194,7 @@ build-www3-dev:
name: collaborating.tuhh.de:5005/cfg0846/research-topics-mat-tuhh/pandoc-bash:latest
entrypoint: [""]
script:
- $RESEARCH_ROOT/bin/build_webpage.sh -b build-www3-dev -p "${REVIEW_BASE_DIR}${CI_COMMIT_REF_NAME}/${CI_COMMIT_SHORT_SHA}"
- $RESEARCH_ROOT/bin/build_webpage.sh -b build-www3-dev -p ${REVIEW_BASE_DIR} -l $/{CI_COMMIT_REF_NAME}/${CI_COMMIT_SHORT_SHA}
artifacts:
paths:
- build-www3-dev
......
......@@ -18,7 +18,7 @@ The option -p is necessary if the webpage will not be deployed on the server roo
Examples:
$(basename "$0") aperiodSchr.md
$(basename "$0") -d -b build -t /forschung/topics/ -w /forschung/ -p /e10/research aperiodSchr.md"
$(basename "$0") -d -b build -t /forschung/topics/ -w /forschung/ -p /e10/research -l /master/1eefgl aperiodSchr.md"
############################################################
#!/bin/bash
RESEARCH_BIN=$RESEARCH_ROOT/bin
......@@ -29,7 +29,7 @@ RESEARCH_BUILD=`pwd`"/build"
RESEARCH_TOPICS=$RESEARCH_ROOT/topics
DEBUG_MODE="False"
while getopts ':hdb:s:t:w:p:' option; do
while getopts ':hdb:l:s:t:w:p:' option; do
case "$option" in
h | --help) echo "$usage"
exit
......@@ -42,6 +42,8 @@ while getopts ':hdb:s:t:w:p:' option; do
;;
p | --prefix) PROJECT_ROOT=$OPTARG
;;
l | --location) PROJECT_LOCATION=$OPTARG
;;
:) printf "missing argument for -%s\n" "$OPTARG" >&2
echo "$usage" >&2
exit 1
......@@ -64,7 +66,7 @@ do
-s "/home/" \
-t "/forschung/topics/" \
-w "/forschung/" \
-p "$PROJECT_ROOT" \
-p "${PROJECT_ROOT}${PROJECT_LOCATION}" \
$f >> $RESEARCH_BUILD/build.log 2>&1
$RESEARCH_BIN/run_pandoc.sh -b "$RESEARCH_BUILD/forschung/topics" \
......@@ -72,7 +74,7 @@ do
$RESEARCH_BUILD/forschung/topics/$filename >> $RESEARCH_BUILD/build.log 2>&1
$RESEARCH_BIN/postproc_topic.sh -b "$RESEARCH_BUILD/forschung/topics" \
-p "$PROJECT_ROOT" \
-p "${PROJECT_LOCATION}" \
$RESEARCH_BUILD/forschung/topics/${filename%.md}.html >> $RESEARCH_BUILD/build.log 2>&1
rm -rf $RESEARCH_BUILD/forschung/topics/${filename%.md}{.md,*bkp}
......@@ -128,7 +130,7 @@ cp -rf $RESEARCH_STATIC/include/{css,javascript,images} $RESEARCH_BUILD/include
for f in $RESEARCH_STATIC/include/html/*.html
do
filename=$(basename -- "$f")
sed -e "s;{project_root};$PROJECT_ROOT;" \
sed -e "s;{project_root};${PROJECT_ROOT}${PROJECT_LOCATION};" \
$f > $RESEARCH_BUILD/include/html/$filename
done
cp $RESEARCH_STATIC/ssi/htaccess $RESEARCH_BUILD/.htaccess
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment