Selaa lähdekoodia

Deletes old build-info.txt in output directory before writing a new one.

Without testing whether a build-info.txt already exists in
./output/${BRANCH}, all build-related variables simply were appended to
such an existing file, which of course does not yield a build-info.txt
in the desired format. Hence, it becomes necessary to delete outdated
build-info.txt files prior to creating a new one.

Signed-off-by: Stefan Laudemann <thisco@webcake.de>
Stefan Laudemann 9 vuotta sitten
vanhempi
commit
b16a95cd2e
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      build.sh

+ 1 - 0
build.sh

@@ -112,6 +112,7 @@ make update
 # we are now ready to produke the firmware images, so let's "save" our state
 build_info_path="${OUTPUT_DIR}/${BRANCH}/${BUILD_INFO_FILENAME}"
 progress "Saving build information to: ${build_info_path}"
+[ -n "${build_info_path}" -a -f "${build_info_path}" ] && rm -f ${build_info_path}
 mkdir -p $(dirname ${build_info_path})
 [ "$?" -eq "0" ] || abort "Unable to create output directory: $(dirname ${build_info_path})"
 touch $(dirname ${build_info_path})