This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.local/bin/mommerge

24 lines
490 B
Plaintext
Raw Normal View History

2020-05-06 03:20:19 +02:00
#! /bin/sh
# Gather the mom files from current dir and compile them into ONE pdf file, using my compiler script
# /!\ files must be names 0_file0, 1_file1... in order to be processed correctly
# if the file already exists, delete it
if [ -e rendu.mom ]; then
rm rendu.mom
fi
pdf_list=$(ls *.mom)
touch rendu.mom
for doc in "$pdf_list"; do
cat "$doc" >> rendu.mom
echo ".COLLATE" >> rendu.mom
done
# Remove the last ".COLLATE"
sed -i '$ d' rendu.mom
# Compile it
compiler rendu.mom