mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 08:33:06 +01:00
19 lines
436 B
Bash
Executable File
19 lines
436 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# registry-rm-repo
|
|
# description: remove repository directory from registry data directory
|
|
|
|
set -eu
|
|
|
|
REPO_DIR="/mnt/registry_data/data/docker/registry/v2/repositories/"
|
|
REPO_TO_DELETE="$1"
|
|
|
|
if [ -d "${REPO_DIR}/${REPO_TO_DELETE}" ]; then
|
|
sudo rm -rf "${REPO_DIR}/${REPO_TO_DELETE}"
|
|
echo "${REPO_TO_DELETE} repo successfully deleted"
|
|
exit 0
|
|
else
|
|
echo "${REPO_TO_DELETE} repo not found"
|
|
exit 1
|
|
fi
|
|
|