#!/bin/bash set -e if [ -d GF ] then pushd GF >/dev/null svn up popd >/dev/null else svn co https://wagnertech.de/svnpriv/Verwaltung/GF fi if [ $1 == TOP ]; then # work on current tree ln -sf ../../Kurse/Linux . ln -sf ../../Kurse/Logo . pushd .. >/dev/null rm *.tex ln -sf src/Linux/Linux.tex . popd >/dev/null else # check out version if [ -d Linux ]; then rm -rf Linux fi svn co -r $1 https://wagnertech.de/svn/Projekte/Kurse/Linux ln -sf ../../Kurse/Logo . pushd .. >/dev/null rm *.tex sed "s/\\\_BUILD/$1/" src/Linux/Linux.tex >./Linux.tex popd >/dev/null fi pushd .. >/dev/null ln -sf src/GF/wagner_tech_briefbogen_blau_fs1.pdf . ln -sf projects/tools/tex/*.sty . ln -sf src/Linux/units . ln -sf src/Linux/img . echo "COMPILE_TARGET = Linux.pdf" >make.pre echo "SOURCES = \\" >> make.pre for file in $(ls units/*.tex) do echo " $file \\" >> make.pre done echo >> make.pre popd >/dev/null