mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 17:49:24 +01:00
Make apis.json only index apis
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
b465a4f593
commit
b603f8c9c1
1 changed files with 3 additions and 5 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue