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
36
PKGBUILD
36
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
|
||||||
git submodule init
|
cd $path
|
||||||
git config submodule.AccessDenied.url $srcdir/AccessDenied
|
git submodule init
|
||||||
git config submodule.FreeRTOS-Kernel.url $srcdir/FreeRTOS
|
for module in ${submodules[$path]}; do
|
||||||
git config submodule.libopenui.url $srcdir/libopenui
|
git config submodule.$module.url $srcdir/$module
|
||||||
git submodule update --init
|
done
|
||||||
|
git submodule update --init
|
||||||
cd $_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/
|
done
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
Loading…
Reference in a new issue