diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-06-07 07:29:48 +0100 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-06-07 07:29:48 +0100 |
commit | 5b9d716e14195bc4e6dcbc118f282dc57c4ec17a (patch) | |
tree | 01149ae4934853ede75655522194b521c1b78809 /resources | |
parent | 37c69e34ff90da3df1194a2b8bf19402437c9d4d (diff) | |
download | librebootfr-5b9d716e14195bc4e6dcbc118f282dc57c4ec17a.tar.gz librebootfr-5b9d716e14195bc4e6dcbc118f282dc57c4ec17a.zip |
build/release/src: copy straight to release/
Diffstat (limited to 'resources')
-rwxr-xr-x | resources/scripts/helpers/build/release/src | 83 |
1 files changed, 39 insertions, 44 deletions
diff --git a/resources/scripts/helpers/build/release/src b/resources/scripts/helpers/build/release/src index 7bd53b10..f50d1762 100755 --- a/resources/scripts/helpers/build/release/src +++ b/resources/scripts/helpers/build/release/src @@ -32,82 +32,77 @@ else distdir='libreboot_src' fi +[ -d release/ ] || mkdir -p "release/" + printf 'Deleting old source release archives\n' -rm -f "${distdir}.tar.xz" rm -f "release/${distdir}.tar.xz" -rm -Rf "${distdir}/" - -mkdir "${distdir}/" +rm -Rf "release/${distdir}/" -printf 'Copying sources to %s/\n' "${distdir}" +printf 'Copying sources to %s/\n' "release/${distdir}" for resource in *; do case "${resource}" in libreboot_* | release | tobuild* | docs);; - *) cp -R "${resource}" "${distdir}/";; + *) cp -R "${resource}" "release/${distdir}/";; esac done -printf '%s\n' "${version}" >"${distdir}/version" +printf '%s\n' "${version}" >"release/${distdir}/version" -printf 'Cleaning files in %s/\n' "${distdir}" +printf 'Cleaning files in %s/\n' "release/${distdir}" # Clean old builds. -(cd "${distdir}/" && ./build clean all) +(cd "release/${distdir}/" && ./build clean all) printf '\n' # Delete Git repositories and properties and Subversion administrative # directories and properties. -rm -Rf "${distdir}/bucts/".git* -rm -Rf "${distdir}/flashrom/".svn* -rm -Rf "${distdir}/grub/".git* +rm -Rf "release/${distdir}/bucts/".git* +rm -Rf "release/${distdir}/flashrom/".svn* +rm -Rf "release/${distdir}/grub/".git* # Delete useless files. -rm -Rf "${distdir}/TODO/" -rm -f "${distdir}/push" +rm -Rf "release/${distdir}/TODO/" +rm -f "release/${distdir}/push" # Delete the deblob scripts. # Since the source archive doesn't distribute the download scripts and already # comes with a deblobbed coreboot, the deblobbing scripts aren't needed at all. -rm -Rf "${distdir}/resources/utilities/coreboot-libre/" +rm -Rf "release/${distdir}/resources/utilities/coreboot-libre/" # We don't want to encourage development to happen on the release archives. # Development goes in Git. These scripts are not needed in the source archive, # because the files that they download are already included and trimmed. -rm -Rf "${distdir}/resources/scripts/helpers/build/release/" -rm -f "${distdir}/download" -rm -Rf "${distdir}/resources/scripts/helpers/download/" -rm -Rf "${distdir}/resources/scripts/helpers/build/trim/" +rm -Rf "release/${distdir}/resources/scripts/helpers/build/release/" +rm -f "release/${distdir}/download" +rm -Rf "release/${distdir}/resources/scripts/helpers/download/" +rm -Rf "release/${distdir}/resources/scripts/helpers/build/trim/" # Patches are not needed, because they are already applied to coreboot sources. -rm -Rf "${distdir}/resources/libreboot/patch/" +rm -Rf "release/${distdir}/resources/libreboot/patch/" # coreboot's crossgcc archives are distributed separately. -rm -Rf "${distdir}/coreboot/util/crossgcc/tarballs/" +rm -Rf "release/${distdir}/coreboot/util/crossgcc/tarballs/" # ich9deblob: There are certain files in there that the user most likely does # not want to share. -rm -f "${distdir}/resources/utilities/ich9deblob/deblobbed_descriptor.bin" -rm -f "${distdir}/resources/utilities/ich9deblob/factory.rom" -rm -f "${distdir}/resources/utilities/ich9deblob/libreboot.rom" -rm -f "${distdir}/resources/utilities/ich9deblob/mkdescriptor.c" -rm -f "${distdir}/resources/utilities/ich9deblob/mkdescriptor.h" -rm -f "${distdir}/resources/utilities/ich9deblob/mkgbe.c" -rm -f "${distdir}/resources/utilities/ich9deblob/mkgbe.h" -rm -f "${distdir}/resources/utilities/ich9deblob/ich9fdgbe_4m.bin" -rm -f "${distdir}/resources/utilities/ich9deblob/ich9fdgbe_8m.bin" -rm -f "${distdir}/resources/utilities/ich9deblob/demefactory_4kdescriptor.bin" -rm -f "${distdir}/mkgbe.c" -rm -f "${distdir}/mkgbe.h" -rm -f "${distdir}/ich9fdgbe_8m.bin" -rm -f "${distdir}/ich9fdgbe_4m.bin" - -printf 'Creating %s.tar.xz\n' "${distdir}" -tar -c "${distdir}/" | xz -9e >"${distdir}.tar.xz" - -# Move the archives to the release/ directory. -[ -d release/ ] || mkdir release/ -mv "${distdir}.tar.xz" release/ - -rm -Rf "${distdir}/" +rm -f "release/${distdir}/resources/utilities/ich9deblob/deblobbed_descriptor.bin" +rm -f "release/${distdir}/resources/utilities/ich9deblob/factory.rom" +rm -f "release/${distdir}/resources/utilities/ich9deblob/libreboot.rom" +rm -f "release/${distdir}/resources/utilities/ich9deblob/mkdescriptor.c" +rm -f "release/${distdir}/resources/utilities/ich9deblob/mkdescriptor.h" +rm -f "release/${distdir}/resources/utilities/ich9deblob/mkgbe.c" +rm -f "release/${distdir}/resources/utilities/ich9deblob/mkgbe.h" +rm -f "release/${distdir}/resources/utilities/ich9deblob/ich9fdgbe_4m.bin" +rm -f "release/${distdir}/resources/utilities/ich9deblob/ich9fdgbe_8m.bin" +rm -f "release/${distdir}/resources/utilities/ich9deblob/demefactory_4kdescriptor.bin" +rm -f "release/${distdir}/mkgbe.c" +rm -f "release/${distdir}/mkgbe.h" +rm -f "release/${distdir}/ich9fdgbe_8m.bin" +rm -f "release/${distdir}/ich9fdgbe_4m.bin" + +printf 'Creating %s.tar.xz\n' "release/${distdir}" +(cd release/ && tar -c "${distdir}/" | xz -9e >"${distdir}.tar.xz") + +rm -Rf "release/${distdir}/" printf 'Source release archives are stored in release/\n' |