Skip to content

Commit d8e03ed

Browse files
committed
server : attempt use valid xxd command on linux
1 parent 580e02e commit d8e03ed

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/server/deps.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ if [ "$1" != "--no-download" ]; then
1212
fi
1313

1414
FILES=$(ls $PUBLIC)
15+
UNAME_S=$(uname -s)
1516

1617
for FILE in $FILES; do
1718
func=$(echo $FILE | tr '.' '_')
1819
echo "generate $FILE.hpp ($func)"
19-
xxd -n $func -i $PUBLIC/$FILE > $DIR/$FILE.hpp
20+
21+
if [ "$UNAME_S" == "Darwin" ]; then
22+
xxd -n $func -i $PUBLIC/$FILE > $DIR/$FILE.hpp
23+
elif [ "$UNAME_S" == "Linux" ]; then
24+
xxd -i $PUBLIC/$FILE > $DIR/$FILE.hpp
25+
sed -i 's/public_//g' $DIR/$FILE.hpp
26+
fi
2027
done

0 commit comments

Comments
 (0)