diff options
| author | danix <danix@danix.xyz> | 2023-04-18 07:10:03 +0200 |
|---|---|---|
| committer | danix <danix@danix.xyz> | 2023-04-18 07:10:03 +0200 |
| commit | 1f4d77422386502ce5a67b101be6d6f16eff2175 (patch) | |
| tree | 493fc8964eb93331951f81af5c797988cc1a325d /SOURCE/main.sh | |
| parent | bba0734fdb0ddeea845a8534b24daf13cbda9d1d (diff) | |
| download | bash-notes-1f4d77422386502ce5a67b101be6d6f16eff2175.tar.gz bash-notes-1f4d77422386502ce5a67b101be6d6f16eff2175.zip | |
added showconf option. Fixed bug that prevented the rc file from being correctly sourced for GIT variables.
Diffstat (limited to 'SOURCE/main.sh')
| -rw-r--r-- | SOURCE/main.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/SOURCE/main.sh b/SOURCE/main.sh index 07f96e8..eaad776 100644 --- a/SOURCE/main.sh +++ b/SOURCE/main.sh @@ -1,5 +1,5 @@ # shellcheck disable=SC2006 -GOPT=$(getopt -o hvplr::a::e::d::s:: --long help,version,list,plain,userconf,sync,restore::,backup::,add::,edit::,delete::,show:: -n 'bash-notes' -- "$@") +GOPT=$(getopt -o hvplr::a::e::d::s:: --long help,version,list,plain,userconf,showconf,sync::,restore::,backup::,add::,edit::,delete::,show:: -n 'bash-notes' -- "$@") # shellcheck disable=SC2181 if [ $? != 0 ] ; then helptext >&2 ; exit 1 ; fi @@ -92,7 +92,19 @@ while true; do exit ;; --sync ) - gitsync + case "$2" in + '' ) + gitsync + ;; + '-f' ) + gitsync -f + ;; + * ) + helptext + exit + ;; + esac + shift 2 exit ;; --userconf ) @@ -102,6 +114,10 @@ while true; do # shellcheck disable=SC2317 exit ;; + --showconf ) + configtext + exit + ;; --backup ) case "$2" in '' ) |
