Merge branch 'main' into testing
This commit is contained in:
commit
c425f90b0f
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VALID_ARGS=$(getopt -o s --long subject -- "$@")
|
||||
VALID_ARGS=$(getopt -o s: --long subject: -- "$@")
|
||||
# shellcheck disable=SC2181
|
||||
if [[ ${?} -ne 0 ]]; then
|
||||
exit 1;
|
||||
|
@ -28,9 +28,8 @@ done
|
|||
if [[ -z ${subject} ]]; then
|
||||
usage
|
||||
fi
|
||||
fi
|
||||
|
||||
id=$(/root/tasks/announce.sh --get | xmlstarlet sel -t -i '//subject="'${subject}'"' -m "/ocs/data/element/id" -v .)
|
||||
id=$(/root/tasks/announce.sh --get | xmlstarlet sel -t -i '//subject="'"${subject}"'"' -m "/ocs/data/element/id" -v .)
|
||||
if [[ -n ${id} ]]; then
|
||||
/root/tasks/announce.sh --delete --id "${id}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue