aboutsummaryrefslogtreecommitdiff
path: root/v2/src/bin/security-txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xv2/src/bin/security-txt (renamed from v2/src/development/security-txt.sh.in)24
1 files changed, 12 insertions, 12 deletions
diff --git a/v2/src/development/security-txt.sh.in b/v2/src/bin/security-txt
index 8f6613f..7026969 100755
--- a/v2/src/development/security-txt.sh.in
+++ b/v2/src/bin/security-txt
@@ -4,8 +4,8 @@ set -eu
usage() {
cat <<-'EOF'
Usage:
- src/development/security-txt.sh
- src/development/security-txt.sh -h
+ security-txt
+ security-txt -h
EOF
}
@@ -25,7 +25,7 @@ help() {
Just run it:
- $ sh src/development/security-txt.sh > .well-known/security.txt
+ $ security-txt > .well-known/security.txt
EOF
}
@@ -62,21 +62,21 @@ shift $((OPTIND - 1))
EXPIRES="$(
- LANG=C.UTF-8 gpg --list-key eu@euandre.org |
+ LANG=C.UTF-8 gpg --list-key "$EMAIL" |
awk '/^pub/ { print substr($(NF), 1, 10) }'
)T00:00:00z"
-LANGS="en$(
- echo po/??.po |
- sed 's|\.po$||' |
- sed 's|^po/|, |' |
- paste -sd,
+LANGUAGES="$(
+ langs |
+ sed 's|^|, |' |
+ tr -d '\n' |
+ sed 's|^, ||'
)"
cat <<-EOF
- Contact: mailto:@EMAIL@
- Encryption: https://@DOMAIN@/public.asc.txt
+ Contact: mailto:$EMAIL
+ Encryption: $(url-for 'public.asc.txt' | absolute)
Expires: $EXPIRES
- Preferred-Languages: $LANGS
+ Preferred-Languages: $LANGUAGES
EOF