From e830035c1cfcf78733feeb4b38ea6f60390a8376 Mon Sep 17 00:00:00 2001 From: Jhen Date: Fri, 18 Aug 2023 05:45:08 +0800 Subject: [PATCH] server : use xxd in public/ for simplify func name --- examples/server/deps.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples/server/deps.sh b/examples/server/deps.sh index 512636bae..6a164bee8 100755 --- a/examples/server/deps.sh +++ b/examples/server/deps.sh @@ -12,17 +12,12 @@ if [ "$1" != "--no-download" ]; then fi FILES=$(ls $PUBLIC) -UNAME_S=$(uname -s) +cd $PUBLIC for FILE in $FILES; do func=$(echo $FILE | tr '.' '_') echo "generate $FILE.hpp ($func)" - if [ "$UNAME_S" == "Darwin" ]; then - xxd -n $func -i $PUBLIC/$FILE > $DIR/$FILE.hpp - elif [ "$UNAME_S" == "Linux" ]; then - xxd -i $PUBLIC/$FILE > $DIR/$FILE.hpp - replace_prefix="$(echo $PUBLIC | tr '/' '_')_" - sed -i "s/$replace_prefix//g" $DIR/$FILE.hpp - fi + # use simple flag for working on Linux and Mac + xxd -i $FILE > $DIR/$FILE.hpp done