Changeset 11120 for NEMO/trunk/doc/tools/shr_func.sh
- Timestamp:
- 2019-06-17T12:14:19+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/tools/shr_func.sh
r11033 r11120 1 1 #!/bin/sh 2 3 4 ## Default options for GNU find (Linux OS)5 find_pre=''; find_suf='-regextype posix-extended'6 7 ## Test OS to tweak the options in find command for working in extended mode everywhere8 [ '$( uname )' = 'Darwin' ] && { find_pre='-E'; find_suf=''; }9 2 10 3 clean() { 11 4 ## Not sure if this step is needed, guess latexmk should be able to detect a change 12 printf "\t¤ Clean previous build\n" 13 14 ## Delete temp files from previous build 15 printf "\t - delete all temporary files (.aux, .bbl, ...)\n" 16 find ${find_pre} latex/$1 ${find_suf} \ 17 -regex ".*\.(aux|bbl|blg|dvi|fdb|fls|idx|ilg|ind|log|maf|mtc|out|pdf|toc)" \ 18 -exec rm {} \; 19 20 ## Remove minted folders 21 printf "\t - remove pygments input hash files (\"_minted\" folders)\n" 22 find latex/$1 -type d -name '_minted*' -exec rm -r {} \; 2> /dev/null 5 printf "\t¤ Clean previous build" 6 find latex/$1/build -mindepth 1 -prune -exec rm -rf {} \; 23 7 24 8 ## HTML exports … … 31 15 build() { 32 16 printf "\t¤ Generation of the PDF format\n" 33 cd latex/$1/main 34 latexmk $opts $1'_manual' 1> /dev/null 35 [ -f $1'_manual'.pdf ] && mv $1'_manual'.pdf ../../.. 36 cd - > /dev/null 17 latexmk $opts -outdir=../build -cd ./latex/$1/main/$1_manual 1> /dev/null 18 [ -f ./latex/$1/build/$1_manual.pdf ] && mv ./latex/$1/build/$1_manual.pdf . 19 # cd - > /dev/null 37 20 echo 38 21 }
Note: See TracChangeset
for help on using the changeset viewer.