]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
setup_container_runtime.sh: Drop bc
authorZack Cerza <zack@cerza.org>
Fri, 1 Aug 2025 18:49:30 +0000 (12:49 -0600)
committerZack Cerza <zack@cerza.org>
Fri, 1 Aug 2025 18:49:30 +0000 (12:49 -0600)
Use bash instead for math. Thanks to John Mulligan for the suggestion.

Signed-off-by: Zack Cerza <zack@cerza.org>
scripts/setup_container_runtime.sh

index c1634fda92ba45d52aaad413d7057adbd773f544..313504d77396bd3294af4df275cbb41021f813aa 100755 (executable)
@@ -36,7 +36,7 @@ function setup_container_runtime () {
       if [ -d $PODMAN_STORAGE_DIR ]; then
         sudo chgrp -R $(groups | cut -d' ' -f1) $PODMAN_STORAGE_DIR
         if [ $(podman unshare du -s --block-size=1G $PODMAN_STORAGE_DIR | awk '{print $1}') -ge 50 ]; then
-          time podman image prune --filter=until="$(echo '24*7' | bc)h" --all --force
+          time podman image prune --filter=until="$((24*7))h" --all --force
           time podman system prune --force
           test "$PODMAN_MAJOR_VERSION" -ge 5 && time podman system check --repair --quick
         fi