diff --git a/generate_releases.sh b/generate_releases.sh index c99265e..50a07c5 100755 --- a/generate_releases.sh +++ b/generate_releases.sh @@ -70,9 +70,13 @@ do done - echo "generating ${ODOO_VERSION}/releases.txt..." - paste -d '\n' "${ODOO_VERSION}/releases.txt" "${ODOO_VERSION}/releases.txt.tmp" | sort -r | uniq > "${ODOO_VERSION}/releases.txt.out" - mv "${ODOO_VERSION}/releases.txt.out" "${ODOO_VERSION}/releases.txt" - rm "${ODOO_VERSION}/releases.txt.tmp" + if [[ -f "${ODOO_VERSION}/releases.txt.tmp" ]]; then + # releases.txt.tmp file exists => there are changes to be processed + + echo "generating ${ODOO_VERSION}/releases.txt..." + paste -d '\n' "${ODOO_VERSION}/releases.txt" "${ODOO_VERSION}/releases.txt.tmp" | sort -r | uniq > "${ODOO_VERSION}/releases.txt.out" + mv "${ODOO_VERSION}/releases.txt.out" "${ODOO_VERSION}/releases.txt" + rm "${ODOO_VERSION}/releases.txt.tmp" + fi done