Skip to content
Snippets Groups Projects
Commit 9e266329 authored by iaibrys's avatar iaibrys
Browse files

Update for the new filesystem layout.

parent 820bf810
No related branches found
No related tags found
No related merge requests found
Pipeline #144 passed
......@@ -5,6 +5,7 @@
course=$1
course_zip=$2
jobid=$3
enote_output_dir="/content/$course/sharelatex-private"
project="/tmp/$course/$jobid"
......@@ -18,6 +19,7 @@ mkdir -p $project
pdflatex="pdflatex -halt-on-error -interaction=nonstopmode"
echo "/build-pdf.sh $course $course_zip $jobid"
echo "outputting to ${enote_output_dir}"
# ---- Download the enote as zip
......@@ -68,10 +70,9 @@ if [ $course == 00000 ] || [ $course == 01005 ] || [ $course == 01006 ]; then
ls *tex | parallel -j 8 "$pdflatex {}"
co="/enotes/$course"
mkdir -p $co
rm -f $co/*
cp *pdf $co/
mkdir -p ${enote_output_dir}
rm -f ${enote_output_dir}/*
cp *pdf ${enote_output_dir}/
fi
if [ $course == 02323 ] || [ $course == 02402 ]; then
......@@ -80,19 +81,16 @@ if [ $course == 02323 ] || [ $course == 02402 ]; then
rm -rf cache
ln -s /cache/$course cache
co="/enotes/$course"
R -e "source('make.R')" 2>&1 > ${enote_output_dir}/log.txt
R -e "source('make.R')" 2>&1 > $co/log.txt
mkdir -p $co
mv $co/log.txt /tmp/
rm -rf $co/*
mv /tmp/log.txt $co/
cp -r menu/* $co/
mkdir -p ${enote_output_dir}
mv ${enote_output_dir}/log.txt /tmp/
rm -rf ${enote_output_dir}/*
mv /tmp/log.txt ${enote_output_dir}/
cp -r menu/* ${enote_output_dir}/
fi
# HACK to set the right owner for the staging files.
co="/enotes/$course"
chown -R 1000:1000 $co
chown -R 1000:1000 ${enote_output_dir}
echo "Done ${course}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment