aboutsummaryrefslogtreecommitdiffstats
path: root/SOURCE/CORE/git.sh
diff options
context:
space:
mode:
authordanix <danix@danix.xyz>2023-04-22 09:53:42 +0200
committerdanix <danix@danix.xyz>2023-04-22 09:53:42 +0200
commit3bd93e7f52109ecb0f3fb4ed426de3540d9b6b01 (patch)
tree614bf3b6fa5ffe67ffd9a986798c2b414c7f3d81 /SOURCE/CORE/git.sh
parentcf9f797b245fef7b4ca2694c936520bce337032d (diff)
downloadbash-notes-3bd93e7f52109ecb0f3fb4ed426de3540d9b6b01.tar.gz
bash-notes-3bd93e7f52109ecb0f3fb4ed426de3540d9b6b01.zip
cleanup of the output of the program. Updated README.v0.4gitsupport
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