/flatten-aux-script.sed
sed | 23 lines | 14 code | 1 blank | 8 comment | 0 complexity | 142cba066c3fead10551a42ea09c187b MD5 | raw file
- #(##defaults() ##)
- # Creates a sed script that does aux flattening by finding all of the included
- # dependencies.
- /\\@input{\(.*\)}/{
- # Get the file name
- s//\1/
- # Escape periods and colons
- s![.:]!\\&!g
- h
- # Emit a test for the file name input
- s!.*!\\:\\\\@input{&}:{!
- p
- x
- # Remove escapes and emit a line that reads the file
- s/\\././g
- s/.*/r &/p
- # Add d and endgroup commands
- s/.*/d/p
- s/.*/}/p
- d
- }
- d