summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-09-17 18:31:54 +0200
committerJonathan Bauer2019-09-17 18:31:54 +0200
commit526d4c0967eb8283e898636d8a604d47380b95a9 (patch)
treeac1b2ecb691545d087d0f1699374c724c7c5adcf
parent[dnbd3-rootfs] fix qcow handler error message (diff)
downloadsystemd-init-526d4c0967eb8283e898636d8a604d47380b95a9.tar.gz
systemd-init-526d4c0967eb8283e898636d8a604d47380b95a9.tar.xz
systemd-init-526d4c0967eb8283e898636d8a604d47380b95a9.zip
build-initramfs.sh: improve submodule loop
-rwxr-xr-xbuilder/build-initramfs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh
index 51ae5ddf..432df5fa 100755
--- a/builder/build-initramfs.sh
+++ b/builder/build-initramfs.sh
@@ -39,7 +39,7 @@ if [ ! -e "$_repo_dir" ]; then
git submodule init
# try to clone submodules as shallowy as possible, since we cannot just
# use '--depth 1' on submodules residing on non-master branches...
- for mod in $(awk '$1 == "[submodule" {gsub(/"|]/,"",$2); print $2}' .gitmodules); do
+ for mod in $(grep -Po '(?<=^\[submodule ")([^"]+)' .gitmodules); do
url="$(git config -f .gitmodules --get submodule.${mod}.url)"
path="$(git config -f .gitmodules --get submodule.${mod}.path)"
branch="$(git config -f .gitmodules --get submodule.${mod}.branch)"