Skip to content

Commit 4d9f2e3

Browse files
yf13xiaoxiang781216
authored andcommitted
optional argument for generated ROMFS file path.
existing headerfile path is used when argument is missing. Signed-off-by: Yanfeng Liu <[email protected]>
1 parent ba07574 commit 4d9f2e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/mkromfsimg.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ fsdir=${topdir}/bin
3636
romfsimg=romfs.img
3737
headerfile=boot_romfsimg.h
3838

39+
if [ -n "$1" ]; then # output file path
40+
_path=$(dirname "$1")
41+
# ensure output path exists
42+
mkdir -p $_path 2>/dev/null && headerfile=$1
43+
fi
44+
3945
# Sanity checks
4046

4147
if [ ! -d "${fsdir}" ]; then

0 commit comments

Comments
 (0)