🦺 Add a bit of error handling in netlify DNS scriptlet

This commit is contained in:
Jérôme Petazzoni
2024-08-07 09:53:47 -05:00
parent 59a569e9e7
commit 3fb2c1e9d1

View File

@@ -1,7 +1,9 @@
#!/bin/sh
set -eu
# https://open-api.netlify.com/#tag/dnsZone
[ "$1" ] || {
[ "${1-}" ] || {
echo ""
echo "Add a record in Netlify DNS."
echo "This script is hardcoded to add a record to container.training".
@@ -18,7 +20,7 @@
}
NETLIFY_CONFIG_FILE=~/.config/netlify/config.json
if ! [ "$DOMAIN" ]; then
if ! [ "${DOMAIN-}" ]; then
DOMAIN=container.training
fi