diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-27 18:56:15 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-27 18:56:15 +0200 |
| commit | 69f17767abac2a31ffdaeebc6bc5997b102ffe92 (patch) | |
| tree | b0916e5e401cfb4b3cdd520e8cedd7aa355451a7 /SOURCE/CORE/helpers.sh | |
| parent | 6c563f788d60acab6947637ea6e05eeef103abd1 (diff) | |
| download | bash-notes-69f17767abac2a31ffdaeebc6bc5997b102ffe92.tar.gz bash-notes-69f17767abac2a31ffdaeebc6bc5997b102ffe92.zip | |
Fix title, git toggle, push target, showconf and restore bugs
- addnote: use the title passed on the command line instead of
storing an empty one.
- USEGIT: test for the value true, so USEGIT=false actually
disables git even when GITREMOTE is set.
- git: push to origin HEAD instead of a hardcoded master branch.
- configtext: print GITCLIENT, already defaulted to hostname.
- backup_restore: replace the malformed .git test, always remove
the existing .git before copying the backup one.
- helptext/README: --backup requires a destination.
- README: add Development Approach section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'SOURCE/CORE/helpers.sh')
| -rw-r--r-- | SOURCE/CORE/helpers.sh | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/SOURCE/CORE/helpers.sh b/SOURCE/CORE/helpers.sh index f0d15d2..0612a46 100644 --- a/SOURCE/CORE/helpers.sh +++ b/SOURCE/CORE/helpers.sh @@ -28,7 +28,7 @@ helptext() { echo -e " -r | --restore=[<dir>]\t: Restore a previous backup from dir" echo -e " -v | --version\t\t: Print version" echo -e " --userconf\t\t\t: Export User config file" - echo -e " --backup [<dest>]\t\t: Backup your data in your destination folder" + echo -e " --backup=<dest>\t\t: Backup your data in your destination folder" echo -e " --showconf\t\t\t: Display running options" echo -e " --sync\t\t\t: Sync notes to git repository" echo "" @@ -36,12 +36,7 @@ helptext() { } configtext() { - [ $USEGIT ] && GITUSE="enabled" || GITUSE="disabled" - if [ -n $GITCLIENT ]; then - CLIENTGIT="$( hostname )" - else - CLIENTGIT="$GITCLIENT" - fi + [[ $USEGIT == true ]] && GITUSE="enabled" || GITUSE="disabled" clear echo -e "${BASENAME} configuration is:" @@ -59,7 +54,7 @@ configtext() { echo -e "\tGIT: ${GITUSE} - ${GIT}" echo -e "\tGIT remote: ${GITREMOTE}" echo -e "\tGIT sync delay: ${GITSYNCDELAY}" - echo -e "\tGIT client name: ${CLIENTGIT}" + echo -e "\tGIT client name: ${GITCLIENT}" } # this function returns a random 2 words title |
