From b603f8c9c1c9494c20a2785cb9a3e8b3b5c60370 Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Fri, 12 Aug 2022 20:38:20 +0300 Subject: [PATCH] Make apis.json only index apis Signed-off-by: Ari Archer --- scripts/apis.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/apis.sh b/scripts/apis.sh index b0136ae..343bda5 100755 --- a/scripts/apis.sh +++ b/scripts/apis.sh @@ -10,15 +10,13 @@ mkdata() { main() { printf ' * %s... ' 'Generating api list' - apid='api' - apis="$apid/apis.json" - eapis="$apid/external_apis.json" + apis='api/apis.json' # shellcheck disable=SC2094 { - printf '%s' '{"desc":"Ari-web API list","data":[' + printf '%s' '[' find api -type f -exec basename {} \; | mkdata - echo "\"$(basename "$apis")\"],\"external\":$(cat -- "$eapis" | tr -d ' \n')}" + echo "\"$(basename "$apis")\"]" } >"$apis" echo 'done'