From 0b4cf6f0a141c655af8dc08fff796ba5b31d6046 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Sun, 7 Jan 2024 17:30:12 +0100 Subject: [PATCH] chore: shallow clone camera-streamer submodules (#226) This reduces the download size and disk usage for `camera-streamer`. --- bin/build.sh | 2 +- tools/libs/build_apps.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index b386d894..4093d454 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -130,7 +130,7 @@ clone_cstreamer() { git clone "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" \ -b "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH}" \ "${BASE_CN_BIN_PATH}"/"${CSTREAMER_PATH}" \ - "${CLONE_FLAGS[@]}" --recursive + "${CLONE_FLAGS[@]}" --recurse-submodules --shallow-submodules } ### Clone Apps diff --git a/tools/libs/build_apps.sh b/tools/libs/build_apps.sh index 6575b4b8..2ed84f24 100755 --- a/tools/libs/build_apps.sh +++ b/tools/libs/build_apps.sh @@ -36,7 +36,8 @@ clone_cstreamer() { rm -rf bin/camera-streamer fi sudo -u "${BASE_USER}" \ - git clone "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" --recursive \ + git clone "${CROWSNEST_CAMERA_STREAMER_REPO_SHIP}" \ + --recurse-submodules --shallow-submodules \ -b "${CROWSNEST_CAMERA_STREAMER_REPO_BRANCH}" \ --depth=1 --single-branch bin/camera-streamer }