1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bc_thesis/mff/diplomky/mkdist

63 lines
1.1 KiB
Plaintext

#!/bin/sh
set -e
make clean
for a in bp dp phd ; do
rm -rf vzor-$a{,-win}
git archive --prefix=vzor-$a/ HEAD | tar xf -
rm -rf vzor-$a/mkdist vzor-$a/uprava
done
# BP
(
echo "Generating BP"
cd vzor-bp
cp ../uprava/bp_uprava.pdf .
)
# DP
(
echo "Generating DP"
cd vzor-dp
cp ../uprava/dp_uprava.pdf .
sed -i '
s/bp_uprava/dp_uprava/g
s/bakal<61><6C>sk/diplomov/g
s/BAKAL<41><4C>SK/DIPLOMOV/g
s/bp_uprava/dp_uprava/g
' *.tex README
if grep -ri 'bakal' . ; then
echo >&2 "Substitutions failed"
exit 1
fi
)
# PhD
(
echo "Generating PhD"
cd vzor-phd
cp ../uprava/phd_uprava.pdf .
sed -i '
s/bakal<61><6C>sk<73>/diserta<74>n<EFBFBD>/g
s/bakal<61><6C>sk<73>ch/diserta<74>n<EFBFBD>ch/g
s/bakal<61><6C>skou/diserta<74>n<EFBFBD>/g
s/BAKAL<41><4C>SK<53>/DISERTA<54>N<EFBFBD>/g
s/bp_uprava/phd_uprava/g
/ N<>sleduje vev<65>zan<61> /,+2d
' *.tex README
if grep -ri 'bakal' . ; then
echo >&2 "Substitutions failed"
exit 1
fi
)
for a in bp dp phd ; do
zip -r vzor-$a-iso.zip vzor-$a
cp -a vzor-$a vzor-$a-win
for c in vzor-$a-win/{*.tex,README} ; do
recode iso-8859-2..windows-1250 $c
done
sed -i 's/\[latin2]/[cp1250]/g' vzor-$a-win/prace.tex
zip -r vzor-$a-win.zip vzor-$a-win
done