File: list-images.sh

package info (click to toggle)
libvirt 7.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 143,760 kB
  • sloc: ansic: 502,517; xml: 180,512; python: 8,627; sh: 3,992; perl: 2,763; makefile: 509; javascript: 116; cpp: 22
file content (14 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

prefix="${1##registry.gitlab.com/}"

PROJECT_ID=192693

all_repos() {
  curl -s "https://gitlab.com/api/v4/projects/$PROJECT_ID/registry/repositories?per_page=100" \
    | tr , '\n' | grep '"path":' | sed 's,"path":",,g;s,"$,,g'
}

all_repos | grep "^$prefix" | sed "s,^$prefix,,g" | while read repo; do
    echo "    $repo"
done | sort -u