From d610135c9b6ee43d13bce5e5b6e4ce51c59a3648 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 16 Oct 2017 16:13:59 +0000 Subject: #810: Convertir datos a bytes para ruta REST {{{/repository/images}}}; propiedades de repositorio convierte tamaƱos a valor legible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.1@5463 a21b9725-9963-47de-94b9-378ad31fedc9 --- repoman/bin/checkrepo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'repoman/bin') diff --git a/repoman/bin/checkrepo b/repoman/bin/checkrepo index 822ae20a..b38a689b 100755 --- a/repoman/bin/checkrepo +++ b/repoman/bin/checkrepo @@ -39,6 +39,8 @@ function addToJson() { OUNAME="${IMAGENAME%/*}" IMAGENAME="${IMAGENAME##*/}" fi + # Data size must be numeric (in KB). + [[ $DATASIZE =~ ^[0-9]*$ ]] || DATASIZE=0 # JSON-formatted new entry. JSON=$(cat << EOT | jq . { @@ -48,7 +50,7 @@ function addToJson() { "clonator":"${CLONATOR,,}", "compressor":"${COMPRESSOR,,}", "filesystem":"${FSTYPE^^}", - "datasize":${DATASIZE:-0} + "datasize":$[ DATASIZE * 1024] } EOT ) -- cgit v1.2.3-18-g5258