mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-12-24 03:52:10 +08:00
Formatting
using shfmt to format the code
This commit is contained in:
@@ -90,21 +90,21 @@ _get_root() {
|
|||||||
response="$(_get "$NANELO_API$NANELO_TOKEN/dns/getzones")" || return 1
|
response="$(_get "$NANELO_API$NANELO_TOKEN/dns/getzones")" || return 1
|
||||||
|
|
||||||
# Extract "zones" array into space-separated list
|
# Extract "zones" array into space-separated list
|
||||||
zones=$(echo "$response" \
|
zones=$(echo "$response" |
|
||||||
| tr -d ' \n' \
|
tr -d ' \n' |
|
||||||
| sed -n 's/.*"zones":\[\([^]]*\)\].*/\1/p' \
|
sed -n 's/.*"zones":\[\([^]]*\)\].*/\1/p' |
|
||||||
| tr -d '"' \
|
tr -d '"' |
|
||||||
| tr , ' ')
|
tr , ' ')
|
||||||
_debug zones "$zones"
|
_debug zones "$zones"
|
||||||
|
|
||||||
bestzone=""
|
bestzone=""
|
||||||
for z in $zones; do
|
for z in $zones; do
|
||||||
case "$fulldomain" in
|
case "$fulldomain" in
|
||||||
*."$z"|"$z")
|
*."$z" | "$z")
|
||||||
if [ ${#z} -gt ${#bestzone} ]; then
|
if [ ${#z} -gt ${#bestzone} ]; then
|
||||||
bestzone=$z
|
bestzone=$z
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user