summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/build/release/roms
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/build/release/roms')
-rwxr-xr-xresources/scripts/helpers/build/release/roms44
1 files changed, 29 insertions, 15 deletions
diff --git a/resources/scripts/helpers/build/release/roms b/resources/scripts/helpers/build/release/roms
index b3a9658..b22aeef 100755
--- a/resources/scripts/helpers/build/release/roms
+++ b/resources/scripts/helpers/build/release/roms
@@ -39,32 +39,46 @@ versiondir="release/${version}"
romdir="${versiondir}/rom"
distname="libreboot_${version}"
-[ -d "${romdir}/" ] || mkdir -p "${romdir}/"
-
printf 'Building ROM image release archives for...\n'
cd "bin/"
-for board in *; do
- printf '...%s' "${board}"
- # Put the version string in the archive.
- printf '%s\n' "${version}" >"${board}/version"
+for payload in *; do
+
+ [ ! -d "../${romdir}/${payload}/" ] && mkdir -p "../${romdir}/${payload}/"
+
+ cd "${payload}/"
+
+ for board in *; do
+
+ archivename="${distname}_${payload}_${board}"
- # Delete the old archive
- rm -f "../${romdir}/${distname}_${board}.tar.xz"
+ printf '...%s' "${payload}/${board}"
- cp -R "${board}/" "${distname}_${board}/"
+ # Put the version string in the archive.
+ printf '%s\n' "${version}" >"${board}/version"
- # Create the compressed archive.
- tar -c "${distname}_${board}/" | xz -9e >"../${romdir}/${distname}_${board}.tar.xz"
+ # Delete the old archive
+ rm -f "../../${romdir}/${payload}/${distname}_${board}.tar.xz"
- rm -Rf "${distname}_${board}/"
+ cp -R "${board}/" "${archivename}/"
- # No longer needed.
- rm -f "${board}/version"
+ # Create the compressed archive.
+ tar -c "${archivename}/" | xz -9e >"../../${romdir}/${payload}/${archivename}.tar.xz"
- printf ' OK\n'
+ rm -Rf "${archivename}/"
+
+ # No longer needed.
+ rm -f "${board}/version"
+
+ printf ' OK\n'
+
+ done
+
+ cd "../"
+
done
+
cd "../"
printf 'ROM image release archives are stored in %s/\n' "${romdir}"