
Signed-off-by: Zhang Yu <zhangyu424@huawei.com> --- bin/remind-credit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/remind-credit b/bin/remind-credit index 887bd42..88a629c 100755 --- a/bin/remind-credit +++ b/bin/remind-credit @@ -3,14 +3,14 @@ credit_file=$(date -d Friday +%Y-%m-%d.md) -cd /c/todo.git +cd /c/todo.git || exit for p in $(git ls-tree --name-only HEAD people/) do [ "${p#people/.}" != "$p" ] && continue - [ -n "$(git ls-tree --name-only HEAD $p/credit/$credit_file)" ] && continue + [[ "$(git ls-tree --name-only HEAD "$p"/credit/"$credit_file")" ]] && continue - name=`basename $p` + name=$(basename "$p") # get mail name from /etc/people2mail.yaml mail_to=$(awk "/^$name: /{print \$2}" '/etc/people2mail.yaml') @@ -24,7 +24,7 @@ do # mail to $mail_to mail_subject="[CREDIT] vim people/$name/credit/$credit_file" - mail -s "$mail_subject" $mail_to <<-EOF + mail -s "$mail_subject" "$mail_to" <<-EOF Please create/push ASAP(ref: /etc/user-fullnames): cd ~/todo -- 2.23.0