1
0
mirror of https://github.com/lutris/lutris synced 2024-07-08 19:45:47 +00:00

install script json schema

This commit is contained in:
Martynas Petuška 2022-03-25 01:08:36 +00:00
parent 5a56b1cc2f
commit ba02405eb2
No known key found for this signature in database
GPG Key ID: 81687E7ADCE55FF3

View File

@ -1,8 +1,14 @@
#!/usr/bin/env bash
SELF_DIR="$(dirname "$0")"
curl -d "$(cat "$SELF_DIR/installer.schema.yml")" \
if [[ -z "$1" ]]; then
echo "ERROR: No YAML file passed in!"
exit 1
fi
base="$(basename "$1")"
target="${base%.*}.json"
echo "INFO: $1 > $target"
curl -d "$(cat "$SELF_DIR/$1")" \
-H "Content-Type: text/plain" \
-H 'Accept: application/json' \
-o "$SELF_DIR/installer.schema.json" \
https://www.anyjson.in/api/v2/data/yamltojson
-o "$SELF_DIR/$target" \
https://www.anyjson.in/api/v2/data/yamltojson &> /dev/null