1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-06-27 02:48:42 +08:00

pretty-output: up

This commit is contained in:
Neo_Chen 2020-04-30 21:42:12 +08:00
parent e5f00831b5
commit f6c4b39a90

View file

@ -99,7 +99,7 @@ if [ $# -lt 1 ]; then
"Usage: table-output.sh <table type>\n" \ "Usage: table-output.sh <table type>\n" \
"\n" \ "\n" \
" table types:\n" \ " table types:\n" \
" asn, route, route6, people, node\n" " asn, route, people, node\n"
fi fi
arg="$2" # Optional argument arg="$2" # Optional argument
@ -114,17 +114,17 @@ asn)
"$OWNER" "$NAME" "$DESC" "$OWNER" "$NAME" "$DESC"
done done
;; ;;
route|route6) route)
cd route for i in route*/*; do
for i in *; do subnet="${i#route*/}"
subnet="${i/,/\/}" subnet="${subnet/,/\/}"
source "$i" source "$i"
case "$TYPE" in case "$TYPE" in
TUN30) print_tun30 "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";; TUN30) print_tun30 "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
SUBNET) print_subnet "$subnet" "$NAME" "$DESC";; SUBNET) print_subnet "$subnet" "$NAME" "$DESC";;
PTP) print_ptp "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";; PTP) print_ptp "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
LO) print_lo "$subnet" "$NAME" "$DESC";; LO) print_lo "$subnet" "$NAME" "$DESC";;
*) errmsg "Invalid \$TYPE in this file\n";; *) errmsg "Invalid \$TYPE in $i\n";;
esac esac
done done
;; ;;