diff --git a/deploy-mintme.sh b/deploy-mintme.sh index 12530c7..2dc60c3 100755 --- a/deploy-mintme.sh +++ b/deploy-mintme.sh @@ -29,21 +29,21 @@ for name in ["index.html", "pricing.html", "terms.html", "contact.html"]: elif '
' in text: text = re.sub(r'
.*?
', header, text, count=1, flags=re.S) else: - text = text.replace('', '\n' + header, 1) + text = text.replace('', '\\n' + header, 1) if '
' in text: - text = re.sub(r'
.*?
\s*
', footer, text, count=1, flags=re.S) + text = re.sub(r'
.*?
\\s*', footer, text, count=1, flags=re.S) else: - text = text.replace('', footer + '\n', 1) + text = text.replace('', footer + '\\n', 1) p.write_text(text, encoding="utf-8") cssp = Path("assets/style.css") css = cssp.read_text(encoding="utf-8") if "/* ===== OTB shared branding ===== */" in css: - css = re.sub(r'/\* ===== OTB shared branding ===== \*/.*', brandcss, css, flags=re.S) + css = re.sub(r'/\\* ===== OTB shared branding ===== \\*/.*', brandcss, css, flags=re.S) else: - css += "\n\n" + brandcss + css += "\\n\\n" + brandcss cssp.write_text(css, encoding="utf-8") print("mintme deploy complete") PY diff --git a/deploy-monitor.sh b/deploy-monitor.sh index 2af494b..2e794ab 100755 --- a/deploy-monitor.sh +++ b/deploy-monitor.sh @@ -61,9 +61,9 @@ brandcss = """$BRANDCSS""" p = Path("frontend/styles.css") css = p.read_text(encoding="utf-8") if "/* ===== OTB shared branding ===== */" in css: - css = re.sub(r'/\* ===== OTB shared branding ===== \*/.*', brandcss, css, flags=re.S) + css = re.sub(r'/\\* ===== OTB shared branding ===== \\*/.*', brandcss, css, flags=re.S) else: - css = brandcss + "\n\n" + css + css = brandcss + "\\n\\n" + css p.write_text(css, encoding="utf-8") print("monitor branding css updated") PY diff --git a/deploy-portal.sh b/deploy-portal.sh index 2fe22aa..2bf9c52 100755 --- a/deploy-portal.sh +++ b/deploy-portal.sh @@ -23,17 +23,17 @@ brandcss = """$BRANDCSS""" for p in Path("templates").glob("portal_*.html"): text = p.read_text(encoding="utf-8") if '
' in text: - text = re.sub(r'
.*?
\s*
', footer, text, count=1, flags=re.S) + text = re.sub(r'
.*?
\\s*', footer, text, count=1, flags=re.S) else: - text = text.replace('{% include "footer.html" %}', footer + '\n\n {% include "footer.html" %}') + text = text.replace('{% include "footer.html" %}', footer + '\\n\\n {% include "footer.html" %}') p.write_text(text, encoding="utf-8") cssp = Path("static/css/style.css") css = cssp.read_text(encoding="utf-8") if "/* ===== OTB shared branding ===== */" in css: - css = re.sub(r'/\* ===== OTB shared branding ===== \*/.*', brandcss, css, flags=re.S) + css = re.sub(r'/\\* ===== OTB shared branding ===== \\*/.*', brandcss, css, flags=re.S) else: - css += "\n\n" + brandcss + css += "\\n\\n" + brandcss cssp.write_text(css, encoding="utf-8") print("portal deploy complete") PY