summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-07-15 22:12:46 +0000
committerMiles Bader <miles@gnu.org>1997-07-15 22:12:46 +0000
commit80e4da102181f1e2dc5ef7e33f0a879d4fcb181f (patch)
tree4103aaac2f3ed66c38c862c6bc67de3c3aac8d90
parent30ad98512d751b7c6eff6233785495b85e44ab24 (diff)
Let uncompressed images be smaller than the maximum size.
-rw-r--r--release/mkfsimage.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/release/mkfsimage.sh b/release/mkfsimage.sh
index ca60a40d..181928f8 100644
--- a/release/mkfsimage.sh
+++ b/release/mkfsimage.sh
@@ -337,11 +337,13 @@ if [ "${COMPRESS-no}" = yes ]; then
SIZE=$(($TREE_SIZE * 110 / 100))
test $SIZE -lt $MIN_SIZE && SIZE=$MIN_SIZE
else
- SIZE=$MAX_SIZE
- if [ $TREE_SIZE -gt $SIZE ]; then
+ if [ $TREE_SIZE -gt $MAX_SIZE ]; then
echo 1>&2 "$0: $TREE: Too big (${TREE_SIZE}k) to fit in ${MAX_SIZE}k"
exit 10
fi
+ SIZE=$(($TREE_SIZE * 110 / 100))
+ test $SIZE -lt $MIN_SIZE && SIZE=$MIN_SIZE
+ test $SIZE -gt $MAX_SIZE && SIZE=$MAX_SIZE
fi
eval $ECHO "'# Zeroing disk image...'"