aboutsummaryrefslogtreecommitdiffstats
path: root/SOURCE/main.sh
diff options
context:
space:
mode:
authordanix <danix@danix.xyz>2023-04-18 07:10:03 +0200
committerdanix <danix@danix.xyz>2023-04-18 07:10:03 +0200
commit1f4d77422386502ce5a67b101be6d6f16eff2175 (patch)
tree493fc8964eb93331951f81af5c797988cc1a325d /SOURCE/main.sh
parentbba0734fdb0ddeea845a8534b24daf13cbda9d1d (diff)
downloadbash-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.sh20
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
'' )