1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-27 14:12:09 +00:00

Opportunistically use pipefail

This commit is contained in:
Rohan Kumar 2023-11-25 13:40:52 -08:00
parent a1b6a89a66
commit d1711699d4
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
9 changed files with 19 additions and 1 deletions

View file

@ -5,6 +5,7 @@
# 2. "gzip" or "brotli" # 2. "gzip" or "brotli"
# 3. ECT zopfli compression level # 3. ECT zopfli compression level
# no pipefail here since there are no pipes.
set -e -u set -e -u
output_dir="$1" output_dir="$1"

View file

@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
# Ensure that we can connect to seirdy.one, and print the ipv4/ipv6 addresses used. The latter makes searching through my server logs easier.
# Return a bad exit code if we can't connect over either ipv4 or ipv6.
# no pipefail here since there are no pipes.
set -e -u set -e -u
ipv6_success=1 ipv6_success=1

View file

@ -2,6 +2,7 @@
# Take a single polygot (X)HTML file and make a .xhtml copy of it. Do # Take a single polygot (X)HTML file and make a .xhtml copy of it. Do
# the same for static-compressed versions. # the same for static-compressed versions.
# no pipefail here since there are no pipes.
set -e -u set -e -u
html_file="$1" html_file="$1"

View file

@ -1,3 +1,6 @@
#!/bin/sh #!/bin/sh
# a curl wrapper for seirdy.one # a curl wrapper for seirdy.one
curl --proto "=https" --tlsv1.3 --cert-status -sS -m${SEIRDYONE_CURL_TIMEOUT-10} "$@" # no pipefail here since there are no pipes.
set -e -u
curl --proto "=https" --tlsv1.3 --cert-status -sS -m"${SEIRDYONE_CURL_TIMEOUT-10}" "$@"

View file

@ -4,6 +4,7 @@
# Uses POSIX and cURL in CI, also uses any pass/pash-compatible pwmngr otherwise # Uses POSIX and cURL in CI, also uses any pass/pash-compatible pwmngr otherwise
# The response is cached for 90 minutes. If fetching fresh webmentions fails, fall back to the cached version for up to one day (1440 minutes). If cached webmentions are older than a day, error out. # The response is cached for 90 minutes. If fetching fresh webmentions fails, fall back to the cached version for up to one day (1440 minutes). If cached webmentions are older than a day, error out.
# no pipefail here since there are no pipes.
set -e -u set -e -u
dirname="$(dirname "$0")" dirname="$(dirname "$0")"

View file

@ -6,6 +6,9 @@
# first-party HTML+CSS page. This script fetches webring links by # first-party HTML+CSS page. This script fetches webring links by
# parsing the iframes and appends appropriate values to my webrings.csv file. # parsing the iframes and appends appropriate values to my webrings.csv file.
#shellcheck disable=SC3040 # This only sets pipefail if it's available (e.g. in Bash, Zsh) and otherwise does nothing (in other POSIX shells like Busybox sh and dash)
set -o pipefail 2>/dev/null
set -e -u set -e -u
# the name of this program # the name of this program

View file

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
# For CI: configures SSH and installs binaries that I use to build my site. # For CI: configures SSH and installs binaries that I use to build my site.
# The binaries are statically-linked for Linux on x86_64 # The binaries are statically-linked for Linux on x86_64
# no pipefail here since there are no pipes.
set -e -u set -e -u
# configure ssh # configure ssh

View file

@ -13,6 +13,8 @@
# with sed. # with sed.
# It also decreases indents by one level # It also decreases indents by one level
#shellcheck disable=SC3040 # This only sets pipefail if it's available and otherwise does nothing
set -o pipefail 2>/dev/null || true
set -e -u set -e -u
html_file="$1" html_file="$1"

View file

@ -3,6 +3,7 @@
# Runs xhtmlize-single-file.sh on every single html file in the output dir. # Runs xhtmlize-single-file.sh on every single html file in the output dir.
# exits if xhtmlize-single-file fails. # exits if xhtmlize-single-file fails.
# no pipefail here since there are no pipes.
set -e -u set -e -u
output_dir="$1" output_dir="$1"