OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
am f1380e5b: Merge "Fix su."
[android-x86/system-extras.git]
/
f2fs_utils
/
mkf2fsuserimg.sh
1
#!/bin/bash
2
#
3
# To call this script, make sure make_f2fs is somewhere in PATH
4
5
function usage() {
6
cat<<EOT
7
Usage:
8
${0##*/} OUTPUT_FILE SIZE
9
EOT
10
}
11
12
echo "in mkf2fsuserimg.sh PATH=$PATH"
13
14
if [ $# -lt 2 ]; then
15
usage
16
exit 1
17
fi
18
19
OUTPUT_FILE=$1
20
SIZE=$2
21
shift; shift
22
23
24
if [ -z $SIZE ]; then
25
echo "Need size of filesystem"
26
exit 2
27
fi
28
29
MAKE_F2FS_CMD="make_f2fs -l $SIZE $OUTPUT_FILE"
30
echo $MAKE_F2FS_CMD
31
$MAKE_F2FS_CMD
32
if [ $? -ne 0 ]; then
33
exit 4
34
fi