system/extras
Revision | c84dfc209a1b407d2bc339fbb7ee61f00c798092 (tree) |
---|---|
Time | 2015-04-15 01:43:32 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
mkuserimg.sh: ensure the extra size is larger than 80MB
@@ -48,7 +48,10 @@ if [ -z $SIZE ]; then | ||
48 | 48 | echo "Need size of filesystem" |
49 | 49 | exit 2 |
50 | 50 | elif [ 0 -eq 0$SIZE ]; then |
51 | - SIZE=$((`du -sm $SRC_DIR | cut -f1`*11/10))M | |
51 | + s=$(du -sm $SRC_DIR | cut -f1) | |
52 | + e=$(($s / 10)) | |
53 | + [ $e -lt 80 ] && e=80 | |
54 | + SIZE=$(($s + $e))M | |
52 | 55 | fi |
53 | 56 | |
54 | 57 | if [ -n "$FC" ]; then |