rancher-charts/scripts/clean

19 lines
379 B
Bash
Executable File

#!/usr/bin/env bash
for f in packages/*; do
if [[ -f ${f}/package.yaml ]]; then
if [[ -z $CHART || $CHART == $(basename -- ${f}) ]]; then
rm -rf ${f}/charts
rm -rf ${f}/charts-crd
fi
fi
done
for f in packages/*; do
if [[ -z $CHART || $CHART == $(basename -- ${f}) ]]; then
if [ -d "${f}/charts/charts" ]; then
rm -f ${f}/charts/charts/*.tgz
fi
fi
done