From 76def1218c44cf30d0ad66c291a2100a828a55a6 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Thu, 19 Oct 2023 09:27:03 -0600 Subject: [PATCH] thar we go --- deploy.firebase.sh | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/deploy.firebase.sh b/deploy.firebase.sh index b65b65e..d7bd35f 100755 --- a/deploy.firebase.sh +++ b/deploy.firebase.sh @@ -13,14 +13,6 @@ if which vale; then vale $f || true fi -if tty && ! which firebase; then - f="$(mktemp)" - wget https://firebase.tools -O - > "$f" - export upgrade=true - sudo bash "$f" -fi -which firebase - outdir=$(mktemp -d) cleanup() { rm -rf "$outdir" @@ -31,21 +23,17 @@ rm -rf $outdir mkdir -p $outdir/public cp homebrew/homebrew.html $outdir/public/index.html cp -r ./homebrew/fonts $outdir/public/ -if which google-chrome-stable; then - echo PRINTING PDF - google-chrome-stable \ - --no-sandbox \ - --headless \ - --disable-gpu \ - --print-to-pdf=$outdir/public/BreeLaPointeResume.pdf \ - --run-all-compositor-stages-before-draw \ - --no-pdf-header-footer \ - $outdir/public/index.html -else - cp homebrew/homebrew.pdf $outdir/public/BreeLaPointeResume.pdf -fi -cat $outdir/public/BreeLaPointeResume.pdf | base64 | tr -d '\n'; echo -false + +echo PRINTING PDF +which google-chrome-stable +google-chrome-stable \ + --no-sandbox \ + --headless \ + --disable-gpu \ + --print-to-pdf=$outdir/public/BreeLaPointeResume.pdf \ + --run-all-compositor-stages-before-draw \ + --no-pdf-header-footer \ + $outdir/public/index.html ( if ! which woff2_compress; then @@ -70,6 +58,13 @@ false du -sh "$outdir/public/fonts/"* ) +if tty && ! which firebase; then + f="$(mktemp)" + wget https://firebase.tools -O - > "$f" + export upgrade=true + sudo bash "$f" +fi +which firebase cp -r ../firebase.json ../.firebaserc ../.firebase $outdir/ sed -i "s#deploy/public#public#" $outdir/firebase.json cd $outdir