generate_releases.sh: only update releases if releases.txt.tmp file exists.

This commit is contained in:
Pedro Salgado 2016-12-30 20:08:54 -07:00
parent 748844ec16
commit f925a2e509

View File

@ -70,9 +70,13 @@ do
done done
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..." 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" 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" mv "${ODOO_VERSION}/releases.txt.out" "${ODOO_VERSION}/releases.txt"
rm "${ODOO_VERSION}/releases.txt.tmp" rm "${ODOO_VERSION}/releases.txt.tmp"
fi
done done