diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e42c310..d4ef626 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -10,6 +10,8 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} ENV CLOUDSDK_INSTALL_DIR /usr/local/gcloud/ +ADD glueops-fetch-repos /usr/bin/glueops-repo-fetch +RUN chmod +x /usr/bin/glueops-repo-fetch RUN curl -sSL https://sdk.cloud.google.com | bash ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin RUN gcloud components install gke-gcloud-auth-plugin --quiet diff --git a/glueops-fetch-repos b/glueops-fetch-repos new file mode 100644 index 0000000..a348cfc --- /dev/null +++ b/glueops-fetch-repos @@ -0,0 +1,7 @@ +#https://stackoverflow.com/a/68770988/4620962 + +gh repo list $(basename $(git remote get-url origin)) --limit 1000 | while read -r repo _; do + gh repo clone "$repo" "$repo" -- --depth=1 --recurse-submodules || { + git -C $repo pull + } & +done