mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-04-26 01:14:19 +08:00
26 lines
395 B
Bash
Executable file
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
|