refactor(notes): clean up; wrap login in main function

This commit is contained in:
Ayo Ayco 2025-08-23 17:46:35 +02:00
parent 3f2f90b1c9
commit 5969c69bab

View file

@ -1,15 +1,9 @@
#! /usr/bin/bash
## notes management
# Load config
. ${HOME}/ayo.conf
. ${scripts_dir}/functions.sh
# TODO: write log for echoes with >>>
command=$1
getopts "t" typora; #check if -t flag is given
function editFile() {
@ -55,6 +49,7 @@ function createNote() {
}
}
function main() {
## DIFF
if [ "$1" = "diff" ] || [ "$1" = "d" ]; then
@ -191,3 +186,7 @@ elif [ "$1" = "copy" ] || [ "$1" = "c" ]; then
else
createNote
fi
}
main