From 15fbc7053b38ffdfc37b8b9d5b35af8a5f3f2622 Mon Sep 17 00:00:00 2001 From: dogusyuksel Date: Wed, 20 Nov 2024 10:31:30 +0000 Subject: [PATCH] changed submodules to sctipt --- .github/workflows/rtos-build.yml | 4 +-- .gitmodules | 15 ---------- docker | 1 - setup_environment.sh | 47 ++++++++++++++++++++++++++++++++ thirdparty/CMSIS_5 | 1 - thirdparty/FreeRTOS-Kernel | 1 - thirdparty/STM32L4XX_HAL | 1 - thirdparty/cmsis-header-stm32 | 1 - 8 files changed, 49 insertions(+), 22 deletions(-) delete mode 100644 .gitmodules delete mode 160000 docker create mode 100755 setup_environment.sh delete mode 160000 thirdparty/CMSIS_5 delete mode 160000 thirdparty/FreeRTOS-Kernel delete mode 160000 thirdparty/STM32L4XX_HAL delete mode 160000 thirdparty/cmsis-header-stm32 diff --git a/.github/workflows/rtos-build.yml b/.github/workflows/rtos-build.yml index a6fe325..724a4f8 100644 --- a/.github/workflows/rtos-build.yml +++ b/.github/workflows/rtos-build.yml @@ -15,9 +15,9 @@ jobs: github-server-url: https://github.com/dogusyuksel/rtos_hal_stm32 lfs: true - - name: Download Repos + - name: Setup Environment run: | - git submodule update --init --recursive + ./setup_environment.sh - name: Login to Docker Hub uses: docker/login-action@v3 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 09773a4..0000000 --- a/.gitmodules +++ /dev/null @@ -1,15 +0,0 @@ -[submodule "docker"] - path = docker - url = https://github.com/dogusyuksel/embedded_docker -[submodule "thirdparty/cmsis-header-stm32"] - path = thirdparty/cmsis-header-stm32 - url = https://github.com/modm-io/cmsis-header-stm32.git -[submodule "thirdparty/CMSIS_5"] - path = thirdparty/CMSIS_5 - url = https://github.com/ARM-software/CMSIS_5.git -[submodule "thirdparty/FreeRTOS-Kernel"] - path = thirdparty/FreeRTOS-Kernel - url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git -[submodule "thirdparty/STM32L4XX_HAL"] - path = thirdparty/STM32L4XX_HAL - url = https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git diff --git a/docker b/docker deleted file mode 160000 index 1c7fc6b..0000000 --- a/docker +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1c7fc6b28e080bcb484a640772762d984e09e783 diff --git a/setup_environment.sh b/setup_environment.sh new file mode 100755 index 0000000..835b39c --- /dev/null +++ b/setup_environment.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +update_repo () { + cd $1 + git clean -fd + git checkout * + git pull + cd - +} + +if [ ! -d "thirdparty" ]; then + mkdir thirdparty +fi + +if [ ! -d "thirdparty/STM32L4XX_HAL" ]; +then + git clone https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git thirdparty/STM32L4XX_HAL +else + update_repo "thirdparty/STM32L4XX_HAL" +fi + +if [ ! -d "thirdparty/cmsis-header-stm32" ]; +then + git clone https://github.com/modm-io/cmsis-header-stm32.git thirdparty/cmsis-header-stm32 +else + update_repo "thirdparty/cmsis-header-stm32" +fi + +if [ ! -d "thirdparty/CMSIS_5" ]; then + git clone https://github.com/ARM-software/CMSIS_5.git thirdparty/CMSIS_5 +else + update_repo "thirdparty/CMSIS_5" +fi + +if [ ! -d "thirdparty/FreeRTOS-Kernel" ]; then + git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.git thirdparty/FreeRTOS-Kernel +else + update_repo "thirdparty/FreeRTOS-Kernel" +fi + +if [ ! -d "docker" ]; then + git clone https://github.com/dogusyuksel/embedded_docker.git docker +else + update_repo "docker" +fi + +exit 0 \ No newline at end of file diff --git a/thirdparty/CMSIS_5 b/thirdparty/CMSIS_5 deleted file mode 160000 index 31f2c3f..0000000 --- a/thirdparty/CMSIS_5 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 31f2c3f35c965b59014f7f33eb41916a1cfe90b6 diff --git a/thirdparty/FreeRTOS-Kernel b/thirdparty/FreeRTOS-Kernel deleted file mode 160000 index fffed5e..0000000 --- a/thirdparty/FreeRTOS-Kernel +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fffed5e8096b1f56e97ac7ab27392a7920e6d431 diff --git a/thirdparty/STM32L4XX_HAL b/thirdparty/STM32L4XX_HAL deleted file mode 160000 index 41027c6..0000000 --- a/thirdparty/STM32L4XX_HAL +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 41027c61f69401afe4937db0ebd5d0cdbffbea0d diff --git a/thirdparty/cmsis-header-stm32 b/thirdparty/cmsis-header-stm32 deleted file mode 160000 index 0bb080d..0000000 --- a/thirdparty/cmsis-header-stm32 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0bb080d92d8541a7ac370d40ddb37cbf51a50911