Commit df8d42ed authored by Ondrej Sury's avatar Ondrej Sury

Shell syntax cleanup

parent 5d2ee6b3
......@@ -5,15 +5,15 @@ unset ZONE KTAG ALGO DTYPE DIGEST
export IFS="="
xml2 | while read KEY VAL; do
xml2 | while read -r KEY VAL; do
case "$KEY" in
"/TrustAnchor/Zone") ZONE="$VAL";;
"/TrustAnchor/KeyDigest/KeyTag") KTAG="$VAL";;
"/TrustAnchor/KeyDigest/Algorithm") ALGO="$VAL";;
"/TrustAnchor/KeyDigest/DigestType") DTYPE="$VAL";;
DIGEST="$(echo "$VAL" | tr "[A-Z]" "[a-z]")"
if [ -z "$ZONE" -o -z "$KTAG" -o -z "$ALGO" -o -z "$DTYPE" ]; then
DIGEST="$(echo "$VAL" | tr "[:upper:]" "[:lower:]")"
if [ -z "$ZONE" ] || [ -z "$KTAG" ] || [ -z "$ALGO" ] || [ -z "$DTYPE" ]; then
echo "Missing some KeyDigest parameter"
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment