Move to MANIFEST.JSON

This commit is contained in:
Thomas Farstrike
2025-05-07 16:11:32 +02:00
parent 7cd208411d
commit 9cb146bce6
14 changed files with 190 additions and 94 deletions
+17 -1
View File
@@ -1,14 +1,24 @@
output=appstore_backend/bundled_apps/
outputjson=appstore_backend/apps.json
output=$(readlink -f "$output")
outputjson=$(readlink -f "$outputjson")
mkdir -p "$output"
rm "$output"/*.mpk
rm "$outputjson"
echo "[" | tee -a "$outputjson"
for apprepo in internal_filesystem/apps internal_filesystem/builtin/apps; do
echo "Listing apps in $apprepo"
ls -1 "$apprepo" | while read appdir; do
echo "Bundling $apprepo/$appdir"
pushd "$apprepo"/"$appdir"
version=$( grep "^Version:" META-INF/MANIFEST.MF | cut -d " " -f 2)
manifest=META-INF/MANIFEST.JSON
version=$( jq -r '.version' "$manifest" )
cat "$manifest" | tee -a "$outputjson"
echo -n "," | tee -a "$outputjson"
mpkname="$output"/"$appdir"_"$version".mpk
echo "Creating $mpkname"
zip -r0 "$mpkname" .
@@ -16,3 +26,9 @@ for apprepo in internal_filesystem/apps internal_filesystem/builtin/apps; do
popd
done
done
# remove the last , to have valid json:
truncate -s -1 "$outputjson"
echo "]" | tee -a "$outputjson"