PageRenderTime 0ms CodeModel.GetById 3ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/flatten-aux-script.sed

https://code.google.com/p/latex-makefile/
sed | 23 lines | 14 code | 1 blank | 8 comment | 0 complexity | 142cba066c3fead10551a42ea09c187b MD5 | raw file
 1#(##defaults() ##)
 2# Creates a sed script that does aux flattening by finding all of the included
 3# dependencies.
 4
 5/\\@input{\(.*\)}/{
 6  # Get the file name
 7  s//\1/
 8  # Escape periods and colons
 9  s![.:]!\\&!g
10  h
11  # Emit a test for the file name input
12  s!.*!\\:\\\\@input{&}:{!
13  p
14  x
15  # Remove escapes and emit a line that reads the file
16  s/\\././g
17  s/.*/r &/p
18  # Add d and endgroup commands
19  s/.*/d/p
20  s/.*/}/p
21  d
22}
23d