Skip to content
Snippets Groups Projects
Commit bc413155 authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel :speech_balloon:
Browse files

add relative paths to reflect built at mat.tuhh

parent 3202e8ae
No related branches found
No related tags found
3 merge requests!84Draft: Resolve "create tests for new commandline arguments",!83Draft: Resolve "deliver css and javascript to www3",!77Resolve "tuhh-deployment"
......@@ -37,7 +37,8 @@ fi
#extract title of topic
echo "Extracting title of $1..."
title=`$RESEARCH_ROOT/bin/extract_title.sh $RESEARCH_BUILD/$filename`
TOPIC_PREFIX="../forschung/topics/"
title=`$RESEARCH_ROOT/bin/extract_title.sh $RESEARCH_BUILD/$filename $TOPIC_PREFIX`
echo "Title of Topic: $title"
# start preprocessing
......@@ -62,7 +63,7 @@ do
echo "Found collaborator $fullname"
# replace name in .md file
sed -i "s;$name;\[$fullname\]($name.html);g" $RESEARCH_BUILD/$filename
sed -i "s;$name;\[$fullname\](../../home/$name.html);g" $RESEARCH_BUILD/$filename
#sed -i "s;$name;\[$fullname\]($baseurl/home/$name);g" $RESEARCH_BUILD/$filename #uncomment this line for linking the mat.tuhh.de webpage
# delete external collaborators if left empty
......
#!/bin/bash
# preproc_staff.sh
# Preprocessor for staff keys in .md topic file
# Replaces key fgabel by "Fabian Gabel, M.Sc." according to Webpage content
# preproc_wg.sh
# Preprocessor for wg keys in .md topic file
# Replaces key aa by "Lehrstuhl Angewandte Analysis" according to Webpage content
# If Build_dir is passed, titles are appended to corresponding files
# Note: mat.tuhh.de uses WINDOWS-1252 character encoding
# preproc_wg.sh [FILE] [RESEARCH_BUILD] [RESEARCH_STAFF]
#
# #1 [FILE] File to be processed
# #2 [RESEARCH_BUILD] Where the procesing takes place (copy or in-place)
# #3 [RESEARCH_STAFF] Where the wg files are located (titles get appended)
# processing command line arguments
if [ $# -lt 2 ]
......@@ -37,7 +42,8 @@ fi
#extract title of topic
echo "Extracting title of $1..."
title=`$RESEARCH_ROOT/bin/extract_title.sh $RESEARCH_BUILD/$filename`
TOPIC_PREFIX="../topics/"
title=`$RESEARCH_ROOT/bin/extract_title.sh $RESEARCH_BUILD/$filename $TOPIC_PREFIX`
echo "Title of Topic: $title"
# start preprocessing
......@@ -55,13 +61,14 @@ do
echo "Found working group $fullname"
mkdir -p $RESEARCH_STAFF/$wg
# append research to wg-file
if [ $# -gt 1 ]
then
echo -e "\n$title\n" >> $RESEARCH_STAFF/$wg.md
echo -e "\n$title\n" >> $RESEARCH_STAFF/$wg/forschung.md
fi
sed -i "s;### Working Groups:\(.*\)$wg\(.*\);### Working Groups:\1\[$fullname\]($wg.html)\2;g" $RESEARCH_BUILD/$filename
sed -i "s;### Working Groups:\(.*\)$wg\(.*\);### Working Groups:\1\[$fullname\](../$wg/forschung.html)\2;g" $RESEARCH_BUILD/$filename
#sed -i "s;### Working Groups:\(.*\)$wg\(.*\);### Working Groups:\1\[$fullname\]($baseurl/forschung/$wg)\2;g" $RESEARCH_BUILD/$filename #uncomment this line for linking the mat.tuhh.de webpage
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment