From fcf0fcbedb79609363c58163a4e093b49de16bb1 Mon Sep 17 00:00:00 2001 From: Kookies <66989235+KookiesGH@users.noreply.github.com> Date: Tue, 22 Mar 2022 13:55:06 -0600 Subject: [PATCH] Add comments to build script (#107) --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.sh b/build.sh index e03b840..c3a625a 100644 --- a/build.sh +++ b/build.sh @@ -3,6 +3,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" archive_filename="nxdumptool-rewrite_poc_$(git rev-parse --short HEAD)" +# Clean-up from last build rm -f ./*.7z rm -rf ./code_templates/tmp @@ -12,6 +13,7 @@ mv ./source/main.cpp ./main.cpp make clean_all +# Build loop for f in ./code_templates/*.c; do basename="$(basename "$f")" filename="${basename%.*}" @@ -38,12 +40,15 @@ for f in ./code_templates/*.c; do make BUILD_TYPE="$filename" clean done +# Post build clean-up make clean_all +# Package resulting binaries cd ./code_templates/tmp 7z a ../../"$archive_filename.7z" */*.nro 7z a ../../"$archive_filename-Debug_ELFs.7z" */*.elf +# Final clean-up cd ../.. rm -f ./source/main.c rm -rf ./code_templates/tmp