diff options
author | Erich Eckner <git@eckner.net> | 2018-06-26 14:35:01 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-26 14:41:14 +0200 |
commit | f761c581a0850fc34fc8e97012a50d51880b36fa (patch) | |
tree | e0a904c646c713797084dc0f2bea2fcc10eea6da | |
parent | 0d17d2556fdfa18a9d9994f4ce2152efdb63f71d (diff) | |
download | archlinuxewe.git.save-f761c581a0850fc34fc8e97012a50d51880b36fa.tar.xz |
archPackagesUpdate: kleiner Hack um submodule zu klonen
-rwxr-xr-x | archPackagesUpdate | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate index fa2a571a..864cc58c 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -213,6 +213,25 @@ git archive --format tar "${branch}" | \ tar -x -C "${tmpDir}" -f - cd "${tmpDir}" +if [ -f '.gitmodules' ]; then + sed -n ' + /^\s*path = /{ + N + s/^\s*path = // + s/\n\s*url = / / + s,ssh://aur@aur.archlinux.org/,https://aur.archlinux.org/, + p + } + ' '.gitmodules' | \ + while read -r path url; do + if [ -n "$(ls -A "${path}")" ]; then + git submodule update -- "${path}" + continue + fi + mkdir -p "${path}" + git clone "${url}" "${path}" + done +fi # update $0 if ${updateMe} && ${aufRechenknecht} && [ -e "$(basename "$0")" ] && ! diff -q "$(basename "$0")" "$0" &> /dev/null |