Bugfix: cd back to root before generating the summary file

This commit is contained in:
Starbeamrainbowlabs 2020-04-06 15:45:48 +01:00
parent dee2053a6a
commit c4c0717ecc
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -145,7 +145,7 @@ task_update() {
task_metafiles() {
if [[ "$(basename "${PWD}")" != "$(basename "${dir_repo}")" ]]; then
cd "${dir_repo}" || { echo "Error: Failed to cd into repo"; exit 3; };
cd "${dir_repo}" || { echo "Error: Failed to cd into repo" >&2; exit 3; };
fi
task_begin "Building packages file";
apt-ftparchive packages . >Packages;
@ -160,6 +160,7 @@ task_metafiles() {
execute gpg --yes -abs -u "${gpg_key_id}" -o Release.gpg Release
task_end $?;
cd - || { echo "Error: Failed to cd back to previous directory" >&2; exit 4; };
tasks_run generate-summary;
}