Move under scripts dir, stop using pip

This commit is contained in:
2020-11-02 18:32:32 +01:00
parent 0cf7426104
commit 5b1f4828bd
5 changed files with 16 additions and 12 deletions

19
scripts/clone.py Executable file
View File

@ -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["ssh_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

7
scripts/services.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
ABRA_DIR="$HOME/.abra/apps"
for f in "$(find $ABRA_DIR -iname "compose*.yml")"; do
echo "$f" && yq read --printMode p "$f" 'services.*' && echo;
done