You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Move to MANIFEST.JSON
This commit is contained in:
+17
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user