File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -eo pipefail
33# Run html-to-text to convert all html files to text files
4- DIR_MAILS= " ../backend/core/templates/mail/"
4+ DOCS_DIR_MAILS= " ${DOCS_DIR_MAILS :- ../ backend/ core/ templates/ mail} /"
55
6- if [ ! -d " ${DIR_MAILS } " ]; then
7- mkdir -p " ${DIR_MAILS } " ;
6+ if [ ! -d " ${DOCS_DIR_MAILS } " ]; then
7+ mkdir -p " ${DOCS_DIR_MAILS } " ;
88fi
99
10- if [ ! -d " ${DIR_MAILS } " html/ ]; then
11- mkdir -p " ${DIR_MAILS } " html/;
10+ if [ ! -d " ${DOCS_DIR_MAILS } " html/ ]; then
11+ mkdir -p " ${DOCS_DIR_MAILS } " html/;
1212 exit ;
1313fi
1414
15- for file in " ${DIR_MAILS } " html/* .html;
15+ for file in " ${DOCS_DIR_MAILS } " html/* .html;
1616 do html-to-text -j ./html-to-text.config.json < " $file " > " ${file% .html} " .txt; done ;
1717
18- if [ ! -d " ${DIR_MAILS } " text/ ]; then
19- mkdir -p " ${DIR_MAILS } " text/;
18+ if [ ! -d " ${DOCS_DIR_MAILS } " text/ ]; then
19+ mkdir -p " ${DOCS_DIR_MAILS } " text/;
2020fi
2121
22- mv " ${DIR_MAILS } " html/* .txt " ${DIR_MAILS } " text/;
22+ mv " ${DOCS_DIR_MAILS } " html/* .txt " ${DOCS_DIR_MAILS } " text/;
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Run mjml command to convert all mjml templates to html files
4- DIR_MAILS= " ../backend/core/templates/mail/html/"
4+ DOCS_DIR_MAILS= " ${DOCS_DIR_MAILS :- ../ backend/ core/ templates/ mail} /html/"
55
6- if [ ! -d " ${DIR_MAILS } " ]; then
7- mkdir -p " ${DIR_MAILS } " ;
6+ if [ ! -d " ${DOCS_DIR_MAILS } " ]; then
7+ mkdir -p " ${DOCS_DIR_MAILS } " ;
88fi
9- mjml mjml/* .mjml -o " ${DIR_MAILS } " ;
9+ mjml mjml/* .mjml -o " ${DOCS_DIR_MAILS } " ;
You can’t perform that action at this time.
0 commit comments