Skip to content

Commit

Permalink
feat: prevent modifying ~/.wget-hsts
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
  • Loading branch information
LucasLarson committed Oct 29, 2023
1 parent 0380a67 commit 80b51a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions update
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
update='2023-10-26'
update='2023-10-29'
IFS="$(command printf -- ' \t\n|')" && IFS="${IFS%'|'}"
command printf -- '\n\n .___ __\n __ ________ __\174 _\057____ _\057 \174_ ____\n\174 \174 \134____ \134 \057 __ \174\134__ \134\134 __\134\057 __ \134\n\174 \174 \057 \174_\076 \076 \057_\057 \174 \057 __ \134\174 \174 \134 ___\057\n\174____\057\174 __\057\134____ \174\050____ \057__\174 \134___ \076\n \174__\174 \134\057 \134\057 \134\057\n a Lucas Larson production\n\n' >&2 && command sleep 1
command printf -- '\360\237\223\241 verifying network connectivity' >&2
Expand All @@ -18,7 +18,7 @@ command printf -- '\n\n' >&2
case "${SHELL##*/}" in *"${0##*-}") return "${update:-1}" ;; *) exit "${update:-1}" ;; esac
}
set -- 'https://lucaslarson.net/update'
command test "$({ command wget --output-document=- --quiet -- "${1-}" || command curl --location --silent -- "${1-}"; } 2>/dev/null | command sed -n -e '/update=/ {' -e 's/[^[:digit:]]//gp' -e 'q' -e '}')" -le "$(command printf -- '%s\n' "${update-}" | command sed -e 's/[^[:digit:]]//g')" || {
command test "$({ command wget --hsts-file=/dev/null --output-document=- --quiet -- "${1-}" || command curl --location --silent -- "${1-}"; } 2>/dev/null | command sed -n -e '/update=/ {' -e 's/[^[:digit:]]//gp' -e 'q' -e '}')" -le "$(command printf -- '%s\n' "${update-}" | command sed -e 's/[^[:digit:]]//g')" || {
command printf -- 'An update to this updater is available\041 Download it from here:\n%s\n' "${1-}" >&2
update=''
unset -v -- update 2>/dev/null
Expand Down

0 comments on commit 80b51a3

Please sign in to comment.