From 2c1dd51a8f92177347f131ce4fc45d904f6dd602 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Fri, 30 Dec 2016 20:02:00 -0700 Subject: [PATCH] generate.sh: fixed handling of argument and merging of results. --- generate_releases.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/generate_releases.sh b/generate_releases.sh index 51b8a6a..a769052 100755 --- a/generate_releases.sh +++ b/generate_releases.sh @@ -15,7 +15,7 @@ # # ##### -ARG_START="$(echo ${1} | tr -d '-' )" +ARG_START="${1}" fmt_date='%Y-%m-%d' today=`date "+${fmt_date}"` @@ -38,6 +38,7 @@ do echo "[ERROR] unknown version ${ODOO_VERSION}" exit 1 fi + echo "ARG_START=${ARG_START} day=${day}" echo "collecting SHA1 checksums for ${ODOO_VERSION} starting at ${day}..." rm -f "${ODOO_VERSION}/releases.txt.tmp" @@ -71,7 +72,7 @@ do done echo "generating ${ODOO_VERSION}/releases.txt..." - paste "${ODOO_VERSION}/releases.txt" "${ODOO_VERSION}/releases.txt.tmp" | sort -r | uniq > "${ODOO_VERSION}/releases.txt" - rm "${ODOO_VERSION}/releases.txt.tmp" + paste "${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" done