Rearranged tree to be more sane. Made formatting changes to stage 2. Fixed a bug where edit would be bypassed if the note was just created.
20 lines
308 B
Bash
20 lines
308 B
Bash
function init_default_config() {
|
|
if [ -z "$ROOTDIR" ]; then
|
|
ROOTDIR=$HOME/.sns
|
|
fi
|
|
if [ -z "$BASEDIR" ]; then
|
|
BASEDIR=$ROOTDIR/notes
|
|
fi
|
|
if [ -z "$EXT" ]; then
|
|
EXT=note
|
|
fi
|
|
if [ -z "$EDITOR" ]; then
|
|
EDITOR=vim
|
|
fi
|
|
if [ -z "$ENC_KEY" ]; then
|
|
ENCRYPTION="FALSE"
|
|
else
|
|
ENCRYPTION="TRUE"
|
|
fi
|
|
}
|