Browse Source

Fix size of packages when > 999999 and < 1048576

Signed-off-by: falkTX <falktx@falktx.com>
pull/16/head
falkTX 4 years ago
parent
commit
58ee747873
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      repo/generate-repo-page.sh

+ 2
- 2
repo/generate-repo-page.sh View File

@@ -171,7 +171,7 @@ for PACKAGE in ${PACKAGES[@]}; do
fi
echo "<tr><td>Version:</td><td>${PACKAGE_VERSION}</td></tr>"
echo "<tr><td>Package size:</td><td>"
if [ ${PACKAGE_SIZE} -gt 999999 ]; then
if [ ${PACKAGE_SIZE} -gt 1048576 ]; then
echo "$((${PACKAGE_SIZE} / 1024 / 1024))Mb"
else
echo "$((${PACKAGE_SIZE} / 1024))Kb"
@@ -185,7 +185,7 @@ for PACKAGE in ${PACKAGES[@]}; do
PACKAGE_DATA_DETAILS=$(cat Packages | tail -n +${PACKAGE_DATA_LINESTART})
fi
PACKAGE_DATA_SIZE=$(echo "${PACKAGE_DATA_DETAILS}" | grep -v "Installed-Size:" | awk 'sub("Size: ","")')
if [ ${PACKAGE_DATA_SIZE} -gt 999999 ]; then
if [ ${PACKAGE_DATA_SIZE} -gt 1048576 ]; then
echo "+ $((${PACKAGE_DATA_SIZE} / 1024 / 1024))Mb (data)"
else
echo "+ $((${PACKAGE_DATA_SIZE} / 1024))Kb (data)"


Loading…
Cancel
Save