thar we go

main
Bel LaPointe 2023-10-19 09:27:03 -06:00
parent 12d21ba0f4
commit 76def1218c
1 changed files with 18 additions and 23 deletions

View File

@ -13,14 +13,6 @@ if which vale; then
vale $f || true vale $f || true
fi 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) outdir=$(mktemp -d)
cleanup() { cleanup() {
rm -rf "$outdir" rm -rf "$outdir"
@ -31,21 +23,17 @@ rm -rf $outdir
mkdir -p $outdir/public mkdir -p $outdir/public
cp homebrew/homebrew.html $outdir/public/index.html cp homebrew/homebrew.html $outdir/public/index.html
cp -r ./homebrew/fonts $outdir/public/ cp -r ./homebrew/fonts $outdir/public/
if which google-chrome-stable; then
echo PRINTING PDF echo PRINTING PDF
google-chrome-stable \ which google-chrome-stable
--no-sandbox \ google-chrome-stable \
--headless \ --no-sandbox \
--disable-gpu \ --headless \
--print-to-pdf=$outdir/public/BreeLaPointeResume.pdf \ --disable-gpu \
--run-all-compositor-stages-before-draw \ --print-to-pdf=$outdir/public/BreeLaPointeResume.pdf \
--no-pdf-header-footer \ --run-all-compositor-stages-before-draw \
$outdir/public/index.html --no-pdf-header-footer \
else $outdir/public/index.html
cp homebrew/homebrew.pdf $outdir/public/BreeLaPointeResume.pdf
fi
cat $outdir/public/BreeLaPointeResume.pdf | base64 | tr -d '\n'; echo
false
( (
if ! which woff2_compress; then if ! which woff2_compress; then
@ -70,6 +58,13 @@ false
du -sh "$outdir/public/fonts/"* 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/ cp -r ../firebase.json ../.firebaserc ../.firebase $outdir/
sed -i "s#deploy/public#public#" $outdir/firebase.json sed -i "s#deploy/public#public#" $outdir/firebase.json
cd $outdir cd $outdir