Skip to content

Commit b7d3b6d

Browse files
committed
Update build scripts to use 'find' for copying project files, ensuring accurate file retrieval
1 parent fefda82 commit b7d3b6d

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

samples/basic/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ $? != 0 ];then
2828
exit 2
2929
fi
3030

31-
cp -a basic ${OUT_DIR}
31+
cp -a $(find . -type f \( -name "basic" -or -name "basic.exe" \)) ${OUT_DIR}
3232

3333
echo -e "\n"
3434

samples/inst-context-threads/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ $? != 0 ];then
2828
exit 2
2929
fi
3030

31-
cp -a inst-context ${OUT_DIR}
31+
cp -a $(find . -type f \( -name "inst-context" -or -name "inst-context.exe" \)) ${OUT_DIR}
3232

3333
echo -e "\n"
3434

samples/inst-context/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ $? != 0 ];then
2828
exit 2
2929
fi
3030

31-
cp -a inst-context ${OUT_DIR}
31+
cp -a $(find . -type f \( -name "inst-context" -or -name "inst-context.exe" \)) ${OUT_DIR}
3232

3333
echo -e "\n"
3434

samples/native-stack-overflow/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ $? != 0 ];then
2727
echo "BUILD_FAIL native-stack-overflow exit as $?\n"
2828
exit 2
2929
fi
30-
cp -a native-stack-overflow ${OUT_DIR}
30+
cp -a $(find . -type f \( -name "native-stack-overflow" -or -name "native-stack-overflow.exe" \)) ${OUT_DIR}
3131

3232
echo "##################### build (WAMR_DISABLE_HW_BOUND_CHECK=1)"
3333
cd ${CURR_DIR}
@@ -39,7 +39,7 @@ if [ $? != 0 ];then
3939
echo "BUILD_FAIL native-stack-overflow exit as $?\n"
4040
exit 2
4141
fi
42-
cp -a native-stack-overflow ${OUT_DIR}/native-stack-overflow.WAMR_DISABLE_HW_BOUND_CHECK
42+
cp -a $(find . -type f \( -name "native-stack-overflow" -or -name "native-stack-overflow.exe" \)) ${OUT_DIR}/native-stack-overflow.WAMR_DISABLE_HW_BOUND_CHECK
4343

4444
echo "##################### signature shared lib"
4545
cd ${CURR_DIR}

samples/shared-module/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ $? != 0 ];then
2828
exit 2
2929
fi
3030

31-
cp -a shared-module ${OUT_DIR}
31+
cp -a $(find . -type f \( -name "shared-module" -or -name "shared-module.exe" \)) ${OUT_DIR}
3232

3333
printf "\n"
3434

samples/terminate/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ $? != 0 ];then
2828
exit 2
2929
fi
3030

31-
cp -a terminate ${OUT_DIR}
31+
cp -a $(find . -type f \( -name "terminate" -or -name "terminate.exe" \)) ${OUT_DIR}
3232

3333
printf "\n"
3434

0 commit comments

Comments
 (0)