1
0
mirror of https://github.com/Optiboot/optiboot.git synced 2025-07-03 05:42:30 +03:00

Clean up and comment the build script

https://github.com/Optiboot/optiboot/issues/129
This commit is contained in:
WestfW
2015-08-07 00:50:46 -07:00
parent 87a0cdb5d2
commit 8169eb5fc6
2 changed files with 30 additions and 7 deletions

View File

@ -23,14 +23,21 @@
"name": "Optiboot %VERSION%", "name": "Optiboot %VERSION%",
"architecture": "avr", "architecture": "avr",
"version": "0.%VERSION%", "version": "0.%VERSION%",
#
# 3r party packages must use "Contributed"
#
"category": "Contributed", "category": "Contributed",
"help": { "help": {
"online": "" "online": "https://github.com/Optiboot/optiboot/wiki"
}, },
"url": "https://github.com/Optiboot/optiboot/releases/download/v%VERSION%/optiboot.zip", "url": "https://github.com/Optiboot/optiboot/releases/download/v%VERSION%/optiboot.zip",
"archiveFileName": "optiboot.zip", "archiveFileName": "optiboot.zip",
#
# Package file verification data
#
"checksum": "SHA-256:%HASH%", "checksum": "SHA-256:%HASH%",
"size": "%SIZE%", "size": "%SIZE%",
#
"boards": [ "boards": [
{"name": "New Optiboot"} {"name": "New Optiboot"}
], ],
@ -42,7 +49,8 @@
} }
] ]
} }
] ],
"tools": []
} }
] ]
} }

View File

@ -16,9 +16,23 @@ rm -Rf /tmp/optiboot-release
# Note that the structure under "packages" (handed by boards manager) # Note that the structure under "packages" (handed by boards manager)
# is different than the structure under "sketchbook/hardware" would be. # is different than the structure under "sketchbook/hardware" would be.
mkdir -p /tmp/optiboot-release/Optiboot/bootloaders/optiboot
TOP=/tmp/optiboot-release/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 ../../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 # 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 zip -r Optiboot.zip Optiboot
HASH=`openssl dgst -sha256 Optiboot.zip | sed -e 's/.* //'` HASH=`openssl dgst -sha256 Optiboot.zip | sed -e 's/.* //'`
SIZE=`stat -f %z Optiboot.zip` SIZE=`stat -f %z Optiboot.zip`
echo size = $SIZE
echo hash = $HASH
popd 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 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.