Merge pull request #2247 from kel-mo/codegen-xxd-stdin [skip ci]
Read the plist from `stdin` without an explicit `-` to make it easier to package on other build systems. `xxd` reads standard input when given no file operand, so the `-` is redundant. It also breaks builds that provide `xxd` through a partial reimplementation such as OpenWrt's [`scripts/xxdi.pl`](https://github.com/openwrt/openwrt/blob/main/scripts/xxdi.pl), which treats `-` as a file name and terminates with an error. This PR removes the redundant `-`.
This commit is contained in:
@@ -23,6 +23,6 @@ printf "// Please do not edit this file!\n" > $2/$BASE_FILENAME.c
|
||||
printf "// This file was automatically generated from $INPUT_FILE_NAME.\n\n" >> $2/$BASE_FILENAME.c
|
||||
printf "#include \"$BASE_FILENAME.h\"\n\n" >> $2/$BASE_FILENAME.c
|
||||
printf "unsigned char ${BASE_FILENAME}_plist[] = {\n" >> $2/$BASE_FILENAME.c
|
||||
plistutil -i $1 | xxd -i - >> $2/$BASE_FILENAME.c
|
||||
plistutil -i $1 | xxd -i >> $2/$BASE_FILENAME.c
|
||||
printf " };\n\n" >> $2/$BASE_FILENAME.c
|
||||
printf "size_t ${BASE_FILENAME}_plist_len = sizeof(${BASE_FILENAME}_plist);\n" >> $2/$BASE_FILENAME.c
|
||||
|
||||
Reference in New Issue
Block a user