Bootstrap gardening repo
This commit is contained in:
commit
ec2b6b8214
|
@ -0,0 +1 @@
|
||||||
|
clones/
|
|
@ -0,0 +1,7 @@
|
||||||
|
default: install
|
||||||
|
.PHONY: install
|
||||||
|
|
||||||
|
install:
|
||||||
|
@python3 -m venv .venv && \
|
||||||
|
.venv/bin/pip install -U pip setuptools wheel && \
|
||||||
|
.venv/bin/pip install -r requirements.txt;
|
|
@ -0,0 +1,13 @@
|
||||||
|
# gardening
|
||||||
|
|
||||||
|
Gardening the Cooperative Cloud configurations.
|
||||||
|
|
||||||
|
## Hacking
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
`make`
|
||||||
|
|
||||||
|
### Scripts
|
||||||
|
|
||||||
|
- **clone_all.py**: clone all coop-cloud/... repositories into a local clones folder
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
from os import mkdir
|
||||||
|
from os.path import exists
|
||||||
|
from pathlib import Path
|
||||||
|
from shlex import split
|
||||||
|
from subprocess import run
|
||||||
|
|
||||||
|
from requests import get
|
||||||
|
|
||||||
|
response = get("https://git.autonomic.zone/api/v1/orgs/coop-cloud/repos")
|
||||||
|
repos = [[p["name"], p["clone_url"]] for p in response.json()]
|
||||||
|
clones = Path("clones").absolute()
|
||||||
|
if not exists(clones):
|
||||||
|
mkdir(clones)
|
||||||
|
for name, url in repos:
|
||||||
|
try:
|
||||||
|
run(split(f"git clone {url} {clones}/{name}"))
|
||||||
|
except Exception:
|
||||||
|
pass
|
|
@ -0,0 +1 @@
|
||||||
|
requests
|
Reference in New Issue