From 3bd93e7f52109ecb0f3fb4ed426de3540d9b6b01 Mon Sep 17 00:00:00 2001 From: danix Date: Sat, 22 Apr 2023 09:53:42 +0200 Subject: cleanup of the output of the program. Updated README. --- SOURCE/CORE/git.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'SOURCE/CORE/git.sh') diff --git a/SOURCE/CORE/git.sh b/SOURCE/CORE/git.sh index 3ddec6c..42c89a8 100644 --- a/SOURCE/CORE/git.sh +++ b/SOURCE/CORE/git.sh @@ -89,13 +89,15 @@ gitremove() { $GIT commit -m "$(basename $0) - ${GITCLIENT} removing all notes." $GIT push origin master else - echo "Deleting note ID ${NOTE}" local OK=$(check_noteID "$NOTE") - cd $BASEDIR - $GIT rm notes/${FILE} - $GIT add . - $GIT commit -m "$(basename $0) - ${GITCLIENT} removing note ID ${NOTE}." - $GIT push origin master + if [[ "$OK" ]]; then + echo "Deleting note ID ${NOTE}" + cd $BASEDIR + $GIT rm notes/${FILE} + $GIT add . + $GIT commit -m "$(basename $0) - ${GITCLIENT} removing note ID ${NOTE}." + $GIT push origin master + fi fi else # no git, so we just keep going -- cgit v1.2.3