Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome committed Oct 20, 2020
1 parent 74ce767 commit 2dc7729
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions scripts/docsascode/assembleDoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
# set -xe

allpdf=""

outputPDF="out.pdf"
[[ ! -z "$DEFAULT_NAME" ]] && outputPDF=$DEFAULT_NAME

destination_folder="."
[[ ! -z "$DEFAULT_DESTINATION" ]] && destination_folder=$DEFAULT_DESTINATION

while [[ $# -gt 0 ]]
do

Expand All @@ -16,7 +22,7 @@ do
shift
;;
*)
echo "extension not supported. only pdf."
printf "extension not supported. only pdf.\n"
exit -1
;;
esac
Expand All @@ -25,10 +31,17 @@ do

done


if [ ! -z "$allpdf" ]
then
echo "assemble: "$allpdf
qpdf --empty $outputPDF --pages $allpdf "--"
echo -e "assemble: "$allpdf
qpdf --empty $destination_folder/$outputPDF --pages $allpdf "--"
if [ -f $destination_folder/$outputPDF ]; then
printf " → file generated: "$destination_folder"/"$outputPDF"\n"
generatedFiles=( "$destination_folder/$outputPDF" )
else
printf " → NO file generated\n"
fi
else
echo "nothing to assemble"
fi
printf "nothing to assemble\n"
fi

0 comments on commit 2dc7729

Please sign in to comment.