summaryrefslogtreecommitdiffstats
path: root/repoman
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-10-16 16:13:59 +0000
committerramon <ramongomez@us.es>2017-10-16 16:13:59 +0000
commitd610135c9b6ee43d13bce5e5b6e4ce51c59a3648 (patch)
tree49dfaaf3a3b39f4741a559322060113587fd7e56 /repoman
parent4073d146fec96ca89608a8e54ca2a6e5a25332ae (diff)
#810: Convertir datos a bytes para ruta REST {{{/repository/images}}}; propiedades de repositorio convierte tamaƱos a valor legible.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5463 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'repoman')
-rwxr-xr-xrepoman/bin/checkrepo4
1 files changed, 3 insertions, 1 deletions
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
)