use associative array and for loops to init submoduls
This commit is contained in:
parent
10160b646a
commit
28f5bc15b4
1 changed files with 15 additions and 23 deletions
32
PKGBUILD
32
PKGBUILD
|
@ -53,29 +53,21 @@ prepare() {
|
||||||
patch ./tools/build-companion.sh < $srcdir/install.patch
|
patch ./tools/build-companion.sh < $srcdir/install.patch
|
||||||
patch ./companion/src/CMakeLists.txt < $srcdir/remove-ssl-check.patch
|
patch ./companion/src/CMakeLists.txt < $srcdir/remove-ssl-check.patch
|
||||||
|
|
||||||
cd $_pkgbase/companion/src/thirdparty/
|
declare -A submodules=(
|
||||||
git submodule init
|
["$_pkgbase/companion/src/thirdparty/"]="yaml-cpp"
|
||||||
git config submodule.yaml-cpp.url $srcdir/yaml-cpp
|
["$_pkgbase/radio/src/thirdparty/"]="AccessDenied FreeRTOS-Kernel libopenui"
|
||||||
git submodule update --init
|
["$_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/"]="FreeRTOS-Kernel-Community-Supported-Ports FreeRTOS-Kernel-Partner-Supported-Ports"
|
||||||
|
["$_pkgbase/radio/src/thirdparty/libopenui/thirdparty/"]="lvgl stb"
|
||||||
|
)
|
||||||
|
|
||||||
cd $_pkgbase/radio/src/thirdparty/
|
for path in "${!submodules[@]}"; do
|
||||||
|
cd $path
|
||||||
git submodule init
|
git submodule init
|
||||||
git config submodule.AccessDenied.url $srcdir/AccessDenied
|
for module in ${submodules[$path]}; do
|
||||||
git config submodule.FreeRTOS-Kernel.url $srcdir/FreeRTOS
|
git config submodule.$module.url $srcdir/$module
|
||||||
git config submodule.libopenui.url $srcdir/libopenui
|
done
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
cd $_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/
|
|
||||||
git submodule init
|
|
||||||
git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url $srcdir/Community-Supported-Ports
|
|
||||||
git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url $srcdir/FreeRTOS-Kernel-Partner-Supported-Ports
|
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
cd $_pkgbase/radio/src/thirdparty/libopenui/thirdparty/
|
|
||||||
git submodule init
|
|
||||||
git config submodule.lvgl.url $srcdir/lvgl
|
|
||||||
git config submodule.stb.url $srcdir/stb
|
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
Loading…
Reference in a new issue