mirror of
https://github.com/GijsVermarien/marktex.git
synced 2025-12-19 19:21:21 +00:00
Created the marktex script
This commit is contained in:
commit
f35abc59bb
16
compile.sh
Normal file
16
compile.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# /bin/bash
|
||||||
|
notforconversion="readme.md"
|
||||||
|
echo $notforconversion is excluded from the conversion
|
||||||
|
markdownfiles=$(find ./ -iname "*.md" -and ! -name $notforconversion)
|
||||||
|
echo Trying to convert: $markdownfiles
|
||||||
|
for markdownfile in $markdownfiles; do
|
||||||
|
latextarget="$(echo $markdownfile | sed -e 's/.md/.tex/')"
|
||||||
|
if [ $latextarget -ot $markdownfile ]; then
|
||||||
|
latextarget="$(echo $markdownfile | sed -e 's/.md/.tex/')"
|
||||||
|
pandoc -f markdown -t latex $markdownfile >>$latextarget
|
||||||
|
echo "converted" $markdownfile "to" $latextarget
|
||||||
|
else
|
||||||
|
echo $markdownfile did not need converting as $latextarget is newer
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "done"
|
||||||
Loading…
Reference in New Issue
Block a user