/get-bibs.sed
https://code.google.com/p/latex-makefile/ · sed · 23 lines · 7 code · 8 blank · 8 comment · 0 complexity · 2c088b4e2a49ce5fffa2c3d4a1422e6d MD5 · raw file
- #(##defaults(target_files="TARGET_FILES")##)
- # Parses a .aux file to find bibdata information
- /^\\bibdata/!d
- # Remove the \bibdata{} from around the pertinent information
- s/\\bibdata{\([^}]*\)}/\1,/
- # Ignore -blx files - they change frequently without affecting the build.
- s/[^,]\{1,\}-blx//
- # Collapse comma sequences
- s/,\{2,\}/,/g
- # Escape spaces in file names
- s/[[:space:]]/\\&/g
- # Change to a space-delimited list of .bib names
- s/,/.bib /g
- # Remove all trailing spaces
- s/ \{1,\}$//