1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-05 21:57:24 +03:00

Making SIZE calculation independent of grep version

This commit is contained in:
Tino Vazquez 2012-10-04 19:07:58 +02:00
parent 8c0aee478f
commit 9d70a5a671

View File

@ -99,7 +99,7 @@ function fs_size {
if [ $? -eq 0 ]; then
#URL is from market place
SIZE=`wget -O - -S --no-check-certificate $BASE_URL 2>&1 | grep -E "^\s*\"size\": \"?[0-9]+\"?$" | tr -dc 0-9`
SIZE=`wget -O - -S --no-check-certificate $BASE_URL 2>&1|grep -E "^ *\"size\": \"?[0-9]+\"?$"|tr -dc 0-9`
else
#Not a marketplace URL
SIZE=`wget -S --spider --no-check-certificate $1 2>&1 | grep Content-Length | cut -d':' -f2`