Move under scripts dir, stop using pip
This commit is contained in:
19
scripts/clone.py
Executable file
19
scripts/clone.py
Executable 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
7
scripts/services.sh
Executable 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
|
Reference in New Issue
Block a user