1
This commit is contained in:
28
linux_service/build.sh
Executable file
28
linux_service/build.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# 该脚本可执行make编译safe_duck模块,然后将其移动到指定位置
|
||||
|
||||
# 设定变量
|
||||
MODULE_NAME=safe_duck
|
||||
TARGET_DIR="/run/user/1000/gvfs/smb-share:server=192.168.1.2,share=dev_share"
|
||||
cmake build;
|
||||
cd build;
|
||||
# 编译模块
|
||||
if make; then
|
||||
|
||||
# 移动模块文件至目标目录
|
||||
if mv ${MODULE_NAME} ${TARGET_DIR}; then
|
||||
|
||||
echo "${MODULE_NAME} moved to ${TARGET_DIR}"
|
||||
|
||||
else
|
||||
|
||||
echo "Failed to move ${MODULE_NAME} to ${TARGET_DIR}"
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
echo "Failed to build ${MODULE_NAME}"
|
||||
|
||||
fi
|
||||
make clean
|
||||
Reference in New Issue
Block a user