build.sh: keep a copy of the previous build.log for reference

This should be quite useful specially when looping with run-nightly.sh
since otherwise the old log file is immediately lost.

We might consider later if we want to keep more logs around,
though with nightly they would build up quite fast

[skip ci]
This commit is contained in:
Jens Petersen 2022-03-19 12:09:59 +08:00
parent 10b2fcffe6
commit 62ae47ba61

View File

@ -124,6 +124,11 @@ case $SHORTNAME in
nightly) JOBS=1 ;;
esac
if [ -e "$SHORTNAME-build.log" ]
then
cp -p $SHORTNAME-build.log $SHORTNAME-build.log-previous
fi
# Now do the actual build. We need to first set the owner of the home directory
# correctly, so we run the command as root, change owner, and then use sudo to
# switch back to the current user