mirror of
https://github.com/sipeed/MaixCDK.git
synced 2026-11-09 17:04:38 -06:00
* Distinguish output directories for projects on different platforms
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -74,6 +74,7 @@ docs/api/*
|
|||||||
!docs/api/config.json
|
!docs/api/config.json
|
||||||
projects/MaixPy/docs/api/
|
projects/MaixPy/docs/api/
|
||||||
projects/apps/
|
projects/apps/
|
||||||
|
projects/*_apps/
|
||||||
examples/*/CMakeLists.txt
|
examples/*/CMakeLists.txt
|
||||||
projects/*/CMakeLists.txt
|
projects/*/CMakeLists.txt
|
||||||
examples/*/build/
|
examples/*/build/
|
||||||
|
|||||||
@@ -41,6 +41,14 @@ function platform_setting()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
platform="$1"
|
||||||
|
else
|
||||||
|
platform_setting
|
||||||
|
fi
|
||||||
|
|
||||||
|
apps_dir=${platform}_apps
|
||||||
|
|
||||||
function build_start()
|
function build_start()
|
||||||
{
|
{
|
||||||
# test_script $1
|
# test_script $1
|
||||||
@@ -56,22 +64,16 @@ function build_start()
|
|||||||
maixcdk distclean
|
maixcdk distclean
|
||||||
maixcdk release -p "$platform" --toolchain-id default
|
maixcdk release -p "$platform" --toolchain-id default
|
||||||
fi
|
fi
|
||||||
mkdir -p ../apps
|
mkdir -p ../${apps_dir}
|
||||||
cp -r dist/pack/* ../apps
|
cp -r dist/pack/* ../${apps_dir}
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
platform="$1"
|
|
||||||
else
|
|
||||||
platform_setting
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 获取当前平台对应的黑名单数组
|
# 获取当前平台对应的黑名单数组
|
||||||
blacklist_var="blacklist_${platform}[@]"
|
blacklist_var="blacklist_${platform}[@]"
|
||||||
blacklist=("${!blacklist_var}")
|
blacklist=("${!blacklist_var}")
|
||||||
|
|
||||||
rm -rf apps/
|
rm -rf ${apps_dir}/
|
||||||
|
|
||||||
for dir in */; do
|
for dir in */; do
|
||||||
if [ -d "$dir" ]; then
|
if [ -d "$dir" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user