From 7dc9667becea10c19d3e9fa3a0189b2c76c81a73 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Wed, 22 Nov 2023 12:12:57 +0100 Subject: [PATCH] Fix typo --- templates/script/delete_announcement_with_subject.erb.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/script/delete_announcement_with_subject.erb.sh b/templates/script/delete_announcement_with_subject.erb.sh index a263dd0..9da89f2 100755 --- a/templates/script/delete_announcement_with_subject.erb.sh +++ b/templates/script/delete_announcement_with_subject.erb.sh @@ -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