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

use three input arguments for preproc_topics

parent 0b7517f3
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"
......@@ -4,21 +4,31 @@
if [ $# -lt 1 ]
then
RESEARCH_BUILD=`pwd`"/build"
RESEARCH_STAFF=$RESEARCH_BUILD #directory for staff and wg files
RESEARCH_TOPICS=`pwd`
echo -e "No building directory was specified."
elif [ $# -lt 2 ]
then
RESEARCH_BUILD="$1"
RESEARCH_STAFF=$RESEARCH_BUILD
RESEARCH_TOPICS=$RESEARCH_BUILD
echo -e "No extra topics directory was specified."
elif [ $# -lt 3 ]
then
RESEARCH_BUILD="$1"
RESEARCH_STAFF=$RESEARCH_BUILD
RESEARCH_TOPICS="$2"
else
RESEARCH_BUILD="$1"
RESEARCH_TOPICS="$2"
RESEARCH_STAFF="$3"
fi
mkdir -p $RESEARCH_BUILD
mkdir -p $RESEARCH_STAFF
echo -e "Building into directory $RESEARCH_BUILD ..."
echo -e "Using .md-files from $RESEARCH_TOPICS ..."
echo -e "Building into directory $RESEARCH_BUILD ..."
echo -e "Building staff-files into directory $RESEARCH_STAFF ..."
#rm -rf $RESEARCH_BUILD
baseurl='https://www.mat.tuhh.de'
......@@ -52,10 +62,10 @@ do
echo -e "\n$title\n" >> $RESEARCH_BUILD/index.md
#replace working group
$RESEARCH_ROOT/bin/preproc_wg.sh $RESEARCH_BUILD/$filename $RESEARCH_BUILD >> $RESEARCH_BUILD/build.log 2>&1
$RESEARCH_ROOT/bin/preproc_wg.sh $RESEARCH_BUILD/$filename $RESEARCH_BUILD $RESEARCH_STAFF >> $RESEARCH_BUILD/build.log 2>&1
#replace staff names
$RESEARCH_ROOT/bin/preproc_staff.sh $RESEARCH_BUILD/$filename $RESEARCH_BUILD >> $RESEARCH_BUILD/build.log 2>&1
$RESEARCH_ROOT/bin/preproc_staff.sh $RESEARCH_BUILD/$filename $RESEARCH_BUILD $RESEARCH_STAFF >> $RESEARCH_BUILD/build.log 2>&1
#finalize file
sed -i "s;\](/img/;\](./img/;g" $RESEARCH_BUILD/$filename
......
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