aboutsummaryrefslogtreecommitdiffstats
path: root/SOURCE/CORE/git.sh
diff options
context:
space:
mode:
Diffstat (limited to 'SOURCE/CORE/git.sh')
-rw-r--r--SOURCE/CORE/git.sh14
1 files changed, 8 insertions, 6 deletions
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