woocommerce-paypal-payments/.ddev/commands/web/wp-cleanup
2025-08-29 12:40:40 +02:00

26 lines
395 B
Bash
Executable file

#!/bin/bash
show-help() {
echo -e "\nDelete all logs -l [wp-content path]"
echo -e "\tExample: ddev wp-cleanup -l uploads/wc-logs\n"
}
delete-logs() {
rm .ddev/wordpress/wp-content/$1/*.log
}
declare -i param_counter=0
while getopts "l:h" arg; do
case $arg in
l)
delete-logs $OPTARG
param_counter+=1
;;
h) show-help ;;
esac
done
if [ $param_counter -eq 0 ]; then
show-help
fi