2022-01-19 15:56:33 +00:00
|
|
|
#!/bin/bash
|
2022-01-19 16:21:07 +00:00
|
|
|
# ================================================================
|
|
|
|
# apps.json used to contain the metadata for every app. Now the
|
|
|
|
# metadata is stored in each apps's directory - app/yourapp/metadata.js
|
|
|
|
#
|
|
|
|
# The app loader still wants all the data in one file, so normally
|
|
|
|
# with GitHub pages, Jekyll is automatically run and creates a working
|
|
|
|
# apps.json
|
|
|
|
#
|
|
|
|
# However if you're hosting locally, or not on GitHub pages then you
|
|
|
|
# will want to create apps.json yourself. You can do that by installing
|
|
|
|
# and running Jekyll, OR the easier option is just to run this script.
|
|
|
|
#
|
|
|
|
# If you do this, please do not attempt to commit your modified
|
|
|
|
# apps.json back into the main BangleApps repository!
|
2022-01-19 15:56:33 +00:00
|
|
|
|
|
|
|
cd `dirname $0`/..
|
|
|
|
echo "[" > apps.json
|
|
|
|
for app in apps/*/; do
|
|
|
|
echo "Processing $app...";
|
|
|
|
if [[ "$app" =~ ^apps/_example.* ]]; then
|
|
|
|
echo "Ignoring $app"
|
|
|
|
else
|
|
|
|
cat ${app}metadata.json >> apps.json
|
|
|
|
echo ",\"$app\"," >> apps.json
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
echo "null]" >> apps.json
|