From 5cfc80f2f48d560e9884eaee6b3f09e7acf5e373 Mon Sep 17 00:00:00 2001 From: Charles Wyble Date: Sat, 17 Oct 2020 00:07:29 -0500 Subject: [PATCH] i think this will work.. --- build/build-op-agreement.sh | 12 ++++++++++ build/common.sh | 47 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 build/build-op-agreement.sh create mode 100644 build/common.sh diff --git a/build/build-op-agreement.sh b/build/build-op-agreement.sh new file mode 100644 index 0000000..a18a453 --- /dev/null +++ b/build/build-op-agreement.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +OUTPUT_BASE_DIR="../YOURLLC" +LLC_NAME="YourLLC" + +PDF_OUTPUT_FILE="$OUTPUT_BASE_DIR/$LLC_NAME-Contract.pdf" +MD_OUTPUT_FILE="$OUTPUT_BASE_DIR/$LLC_NAME-Contract.md" + +source common.sh + +prevRunCleanup +makeOutput diff --git a/build/common.sh b/build/common.sh new file mode 100644 index 0000000..410db70 --- /dev/null +++ b/build/common.sh @@ -0,0 +1,47 @@ +function prevRunCleanup() +{ + +rm $MD_OUTPUT_FILE +rm $PDF_OUTPUT_FILE + +} + +function makeOutput() + +{ +#Company specfic bits +company_files=( +"../SingeLLCOpAgreement/title.md" +"../SingeLLCOpAgreement/CompanyNameAndPurpose.md" +"../SingeLLCOpAgreement/grantToMembers.md" +) + +#Common template stuff +boilerplate_files=( +"../CommonBoilerplate/defs.md" +"../CommonBoilerplate/boilerplate.md" +"../CommonBoilerplate/profInterest.md" +"../CommonBoilerplate/remove.md" +"../CommonBoilerplate/nda.md" +"../CommonBoilerplate/ip-assign.md" +"../CommonBoilerplate/TxLLC-ForProfit-MultiMember-Series-ProfitInterestGrant-OpAgreement.md" +) + +IFS=$'\n\t' + +for file in ${company_files[@]}; do + cat $file >> $MD_OUTPUT_FILE +done + +for file in ${boilerplate_files[@]}; do + cat $file >> $MD_OUTPUT_FILE +done + +pandoc \ + < $MD_OUTPUT_FILE \ + --number-sections \ + --toc \ + --from=markdown \ + --to=pdf \ + --output=$PDF_OUTPUT_FILE +}