From f599af44207d071edf03fbed5c5790b45dc6156d Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Fri, 30 Dec 2016 20:21:35 -0700 Subject: [PATCH] build.sh,generate.sh,generate_release.sh: argument to follow %Y-%m-%d. --- build.sh | 2 +- generate.sh | 2 +- generate_releases.sh | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.sh b/build.sh index b726a0b..a700265 100755 --- a/build.sh +++ b/build.sh @@ -15,7 +15,7 @@ # # ##### -ARG_RELEASE="${1}" +ARG_RELEASE=$(echo "${1}" | tr -d '-') for ODOO_VERSION in 8.0 9.0 10.0 do diff --git a/generate.sh b/generate.sh index 3d1c196..f2e2142 100755 --- a/generate.sh +++ b/generate.sh @@ -15,7 +15,7 @@ # # ##### -ARG_RELEASE="${1}" +ARG_RELEASE=$(echo "${1}" | tr -d '-') for ODOO_VERSION in 8.0 9.0 10.0 do diff --git a/generate_releases.sh b/generate_releases.sh index 50a07c5..96dc2b5 100755 --- a/generate_releases.sh +++ b/generate_releases.sh @@ -15,13 +15,13 @@ # # ##### -ARG_START="${1}"ec +ARG_START="${1}" fmt_date='%Y-%m-%d' today=`date "+${fmt_date}"` epoch=$(date -j -f "${fmt_date}" ${today} "+%s") next=$((${epoch} + 86400)) -tomorrow=$(date -j -f "%s" ${next} "+${fmt_date}") +tomorrow=$(date -j -f "%s" ${next} "+${fmt_date}" | tr -d '-') for ODOO_VERSION in 8.0 9.0 10.0 do @@ -39,12 +39,12 @@ do exit 1 fi + release=$(echo "$day" | tr -d '-') + echo "collecting SHA1 checksums for ${ODOO_VERSION} starting at ${day}..." rm -f "${ODOO_VERSION}/releases.txt.tmp" - while [ "${day}" != "${tomorrow}" ]; do - - release="$(echo ${day} | tr -d '-' )" + while [ "${release}" != "${tomorrow}" ]; do if [[ "${ODOO_VERSION}" == '9.0' ]]; then basename="odoo_${ODOO_VERSION}c.${release}" @@ -66,7 +66,8 @@ do epoch=$(date -j -f "${fmt_date}" ${day} "+%s") next=$((${epoch} + 86400)) - day=$(date -j -f "%s" ${next} "+${fmt_date}") + day=$(date -j -f "%s" ${next} "+${fmt_date}" | tr -d '-') + release=$(echo "$day" | tr -d '-') done