diff options
author | Jonathan Bauer | 2019-09-17 18:31:54 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-09-17 18:31:54 +0200 |
commit | 526d4c0967eb8283e898636d8a604d47380b95a9 (patch) | |
tree | ac1b2ecb691545d087d0f1699374c724c7c5adcf | |
parent | [dnbd3-rootfs] fix qcow handler error message (diff) | |
download | systemd-init-526d4c0967eb8283e898636d8a604d47380b95a9.tar.gz systemd-init-526d4c0967eb8283e898636d8a604d47380b95a9.tar.xz systemd-init-526d4c0967eb8283e898636d8a604d47380b95a9.zip |
build-initramfs.sh: improve submodule loop
-rwxr-xr-x | builder/build-initramfs.sh | 2 |
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)" |