Use `find … -delete` to remove file with pattern
This commit is contained in:
parent
9617abc968
commit
3126864255
|
@ -374,7 +374,8 @@ is_queue_disable() { # {{{
|
||||||
return_queue_disable="1"
|
return_queue_disable="1"
|
||||||
|
|
||||||
## Ensure to remove any previously setted file
|
## Ensure to remove any previously setted file
|
||||||
rm -f -- "${sge_queue_flag_file}"
|
# shellcheck disable=SC2086
|
||||||
|
find ${sge_queue_flag_file} -delete
|
||||||
;;
|
;;
|
||||||
3 ) ## Results (header + queue name) so the queue is disable
|
3 ) ## Results (header + queue name) so the queue is disable
|
||||||
local_sge_queue_state="disable"
|
local_sge_queue_state="disable"
|
||||||
|
@ -507,9 +508,10 @@ for host: ${RED}${sge_hostname:=/dev/null}${COLOR_DEBUG}."
|
||||||
|
|
||||||
## If the queue(s) are already enable
|
## If the queue(s) are already enable
|
||||||
### Ensure to remove any potential flag file
|
### Ensure to remove any potential flag file
|
||||||
|
# shellcheck disable=SC2086
|
||||||
### Exit
|
### Exit
|
||||||
is_all_queue_enable "${sge_hostname}" "${sge_queues_name}" \
|
is_all_queue_enable "${sge_hostname}" "${sge_queues_name}" \
|
||||||
&& rm -f -- "${sge_queue_flag_pattern}" \
|
&& find ${sge_queue_flag_pattern} -delete \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
|
|
||||||
## Test all queues one by one
|
## Test all queues one by one
|
||||||
|
|
Loading…
Reference in New Issue