=initial commit
This commit is contained in:
commit
520a20479e
6 changed files with 206 additions and 0 deletions
19
delete-all-catalogs.sh
Executable file
19
delete-all-catalogs.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /usr/bin/env bash
|
||||
set -e
|
||||
|
||||
get_catalogs() {
|
||||
midclt call catalog.query | jq -r '.[] | .label' | grep -v 'OFFICIAL'
|
||||
}
|
||||
|
||||
delete_catalog() {
|
||||
local CATALOG="${1}"
|
||||
printf 'Deleting catalog: %s... ' "$CATALOG"
|
||||
midclt call catalog.delete "$CATALOG"
|
||||
printf '\n'
|
||||
}
|
||||
|
||||
get_catalogs | while read catalog; do
|
||||
[[ -n "$catalog" ]] || continue
|
||||
delete_catalog "$catalog"
|
||||
done
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue