source:
NEMO/trunk/doc/tools/shr_func.sh
@
11033
Last change on this file since 11033 was 11033, checked in by nicolasmartin, 5 years ago | |
---|---|
|
|
File size: 1.3 KB |
Rev | Line | |
---|---|---|
[11004] | 1 | #!/bin/sh |
2 | ||
3 | ||
[11033] | 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 everywhere | |
8 | [ '$( uname )' = 'Darwin' ] && { find_pre='-E'; find_suf=''; } | |
9 | ||
[11004] | 10 | clean() { |
[11033] | 11 | ## Not sure if this step is needed, guess latexmk should be able to detect a change |
12 | printf "\t¤ Clean previous build\n" | |
[11004] | 13 | |
[11033] | 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 {} \; | |
[11004] | 19 | |
[11033] | 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 | |
[11004] | 23 | |
[11033] | 24 | ## HTML exports |
25 | #printf ' - possible HTML export' | |
26 | #find latex/$1 -type d -name 'html*' -exec rm -r {} \; | |
[11004] | 27 | |
[11033] | 28 | echo |
[11004] | 29 | } |
30 | ||
31 | build() { | |
[11033] | 32 | 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 | |
37 | echo | |
[11004] | 38 | } |
Note: See TracBrowser
for help on using the repository browser.