From 8169eb5fc69d03cfef3da83e526dcfe059ade47b Mon Sep 17 00:00:00 2001 From: WestfW Date: Fri, 7 Aug 2015 00:50:46 -0700 Subject: [PATCH] Clean up and comment the build script https://github.com/Optiboot/optiboot/issues/129 --- ...ot_optiboot-additional_index.json.TEMPLATE | 14 ++++++++--- optiboot/release.sh | 23 +++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/optiboot/package_optiboot_optiboot-additional_index.json.TEMPLATE b/optiboot/package_optiboot_optiboot-additional_index.json.TEMPLATE index a311f702f..c1bab59b3 100644 --- a/optiboot/package_optiboot_optiboot-additional_index.json.TEMPLATE +++ b/optiboot/package_optiboot_optiboot-additional_index.json.TEMPLATE @@ -23,14 +23,21 @@ "name": "Optiboot %VERSION%", "architecture": "avr", "version": "0.%VERSION%", +# +# 3r party packages must use "Contributed" +# "category": "Contributed", "help": { - "online": "" + "online": "https://github.com/Optiboot/optiboot/wiki" }, "url": "https://github.com/Optiboot/optiboot/releases/download/v%VERSION%/optiboot.zip", "archiveFileName": "optiboot.zip", +# +# Package file verification data +# "checksum": "SHA-256:%HASH%", "size": "%SIZE%", +# "boards": [ {"name": "New Optiboot"} ], @@ -42,7 +49,8 @@ } ] } - ] + ], + "tools": [] } ] -} \ No newline at end of file +} diff --git a/optiboot/release.sh b/optiboot/release.sh index fe9c111d4..aaf5b7939 100644 --- a/optiboot/release.sh +++ b/optiboot/release.sh @@ -16,9 +16,23 @@ rm -Rf /tmp/optiboot-release # Note that the structure under "packages" (handed by boards manager) # is different than the structure under "sketchbook/hardware" would be. -mkdir -p /tmp/optiboot-release/Optiboot/bootloaders/optiboot TOP=/tmp/optiboot-release/Optiboot/ +# +# Bootloaders directory +mkdir -p $TOP/bootloaders/optiboot +# cores, variants, libraries +# mkdir -p $TOP/variants/ +mkdir -p $TOP/libraries/ +# Less common: firmware, system. +# mkdir -p $TOP/firmwares/ +# mkdir -p $TOP/system/ + +# +# Copy files from whereever into the release director cp ../../boards-1.6.txt $TOP/boards.txt +#cp -R ../../examples $TOP/libraries/ +#cp -R ../../variants $TOP/ +#cp -R ../../system $TOP/ # # Create platform.tx, because it contains the "group" name for the boards menu @@ -50,9 +64,10 @@ pushd /tmp/optiboot-release zip -r Optiboot.zip Optiboot HASH=`openssl dgst -sha256 Optiboot.zip | sed -e 's/.* //'` SIZE=`stat -f %z Optiboot.zip` -echo size = $SIZE -echo hash = $HASH popd -echo sed -e "s/%HASH%/$HASH/" -e "s/%VERSION%/$1/" -e "s/%SIZE%/$SIZE/" ../../package_optiboot_optiboot-additional_index.json.TEMPLATE sed -e "s/#.*//" -e "s/%HASH%/$HASH/" -e "s/%VERSION%/$1/" -e "s/%SIZE%/$SIZE/" ../../package_optiboot_optiboot-additional_index.json.TEMPLATE > /tmp/optiboot-release/package_optiboot_optiboot-additional_index.json +# +# This leaves the .zip and the .json file in /tmp/optiboot-release +# where it can be copied to a suitable network location. +