++abort ripe if password is not set

This commit is contained in:
Nico Schottelius 2022-09-29 15:57:27 +02:00
parent 9f4b5a172e
commit 02ca6960aa

View file

@ -6,6 +6,7 @@ if [ $# -lt 2 ] ; then
echo "$0 network asn [nodryrun]"
echo "ASN needs to be in ASXXXXXX format"
echo "By default uses dry-run and does not create objects"
echo "Requires environment variable RIPE_API_PASSWORD to be set"
exit 1
fi
@ -20,6 +21,11 @@ else
dryrun="&dry-run"
fi
if [ -z "$RIPE_API_PASSWORD" ]; then
echo "You need to set RIPE_API_PASSWORD" >&2
exit 1
fi
form=$(mktemp)
case ${network} in