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 1
1
#! /usr/bin/env bash
2
2
set -eo pipefail
3
3
# 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} /"
5
5
6
- if [ ! -d " ${DIR_MAILS } " ]; then
7
- mkdir -p " ${DIR_MAILS } " ;
6
+ if [ ! -d " ${DOCS_DIR_MAILS } " ]; then
7
+ mkdir -p " ${DOCS_DIR_MAILS } " ;
8
8
fi
9
9
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/;
12
12
exit ;
13
13
fi
14
14
15
- for file in " ${DIR_MAILS } " html/* .html;
15
+ for file in " ${DOCS_DIR_MAILS } " html/* .html;
16
16
do html-to-text -j ./html-to-text.config.json < " $file " > " ${file% .html} " .txt; done ;
17
17
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/;
20
20
fi
21
21
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 1
1
#! /usr/bin/env bash
2
2
3
3
# 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/"
5
5
6
- if [ ! -d " ${DIR_MAILS } " ]; then
7
- mkdir -p " ${DIR_MAILS } " ;
6
+ if [ ! -d " ${DOCS_DIR_MAILS } " ]; then
7
+ mkdir -p " ${DOCS_DIR_MAILS } " ;
8
8
fi
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