diff options
author | Erich Eckner <git@eckner.net> | 2018-09-28 19:46:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-28 19:46:06 +0200 |
commit | 3546003ca936dcaeb5182374842f94226f1794ae (patch) | |
tree | 43a1ad2ca2924b621961d9c3d984d3022249e85c /clone-repos | |
parent | 6a3dddfd3ebb4ce41c81c33b0e529c83c7db403c (diff) | |
download | archive-server-3546003ca936dcaeb5182374842f94226f1794ae.tar.xz |
clone-repos,httpdocs/index.php: mark repo type in wish-list, too
Diffstat (limited to 'clone-repos')
-rwxr-xr-x | clone-repos | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/clone-repos b/clone-repos index 6991380..89dcb24 100755 --- a/clone-repos +++ b/clone-repos @@ -6,7 +6,7 @@ if [ ! -s "${base_dir}/work/wish-list" ]; then exit fi -while read -r source_base64; do +while read -r type source_base64; do if [ -d "${base_dir}/work/repositories/${source_base64}" ]; then continue fi @@ -14,9 +14,20 @@ while read -r source_base64; do printf '%s' "${source_base64}" | \ base64 -d ) - git -C "${base_dir}/work/repositories" clone --mirror "${source}" "${source_base64}" + case "${type}" in + 'git') + git -C "${base_dir}/work/repositories" clone --mirror "${source}" "${source_base64}" + ;; + *) + >&2 printf 'unknown type "%s"\n' \ + "${type}" + ;; + ) done < \ "${base_dir}/work/wish-list" -grep -vxF "$(ls "${base_dir}/work/repositories")" "${base_dir}/work/wish-list" | \ +grep -vxF "$( + find "${base_dir}/work/repositories" -mindepth 2 -maxdepth 2 | \ + sed 's,^.*/\([^/]\+\)/\([^/]\+\)$,\1 \2,' +)" "${base_dir}/work/wish-list" | \ sponge "${base_dir}/work/wish-list" |