nuttx-apps/examples/nxflat/tests/mkdirlist.sh
liuhaitao 0c60624276 Update make dependency for elf/module/nxflat/posix_spawn/sotest/thttpd
Update make dependency for elf/module/nxflat/posix_spawn/sotest/thttpd examples which make use of
mksymtab.sh. This could avoid them built twice in 'make depend' and 'make all' which would result
in file truncated build break. Now only build once by 'make all'.

Change-Id: I5d8f1ebbf73e3b12d7d2118f1f51b4233d0ed007
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-15 13:36:05 +08:00

31 lines
425 B
Bash
Executable File

#!/usr/bin/env bash
usage="Usage: %0 <romfs-dir-path>"
dir=$1
if [ -z "$dir" ]; then
echo "ERROR: Missing <romfs-dir-path>"
echo ""
echo $usage
exit 1
fi
if [ ! -d "$dir" ]; then
echo "ERROR: Directory $dir does not exist"
echo ""
echo $usage
exit 1
fi
echo "#include <stddef.h>"
echo ""
echo "static const char *dirlist[] ="
echo "{"
for file in `ls $dir`; do
echo " \"$file\","
done
echo " NULL"
echo "};"