Attempt to automatically calculate a reasonable ramdisk size

This commit is contained in:
K. Lange 2018-09-21 15:24:01 +09:00
parent 59e94c5d92
commit 7bea460866

View File

@ -2,11 +2,16 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -e "$DIR/../base/usr/share/fonts" ]; then
echo 20000
elif [ -e "$DIR/../base/usr/python" ]; then
echo 11000
else
echo 4096
fi
SPACE_REQ=$(du -sb "$DIR/../base" | cut -f 1)
let "SIZE = $SPACE_REQ / 4096 + 2048"
echo $SIZE
#if [ -e "$DIR/../base/usr/share/fonts" ]; then
# echo 20000
#elif [ -e "$DIR/../base/usr/python" ]; then
# echo 11000
#else
# echo 4096
#fi