#!/bin/sh # Fudge factor as a percent FUDGE=${1:-40} echo "FUDGE = $FUDGE" > /tmp/out SIZE=`du -sk --exclude=persistent* build_warp/root | cut -f1` FUDGE=$(($SIZE * $FUDGE / 100)) SIZE=$((SIZE + $FUDGE)) # Round up to megs SIZE=$((($SIZE + 500) / 1000 * 1000)) echo $SIZE