Changes: Split script into several different files for easier editting Added build.sh to compile Simple Note System from tree Changed config file to config folder; $HOME/.sns now contains configuration and notes Testing: Script runs and produces help screen; no further testing done.
36 lines
813 B
Bash
36 lines
813 B
Bash
#==============================================================================
|
|
# Section: Helper Functions
|
|
#==============================================================================
|
|
function writeconf {
|
|
cat > $HOME/.sns/sns.conf << EOF
|
|
#==========================================================
|
|
# Simple Note System Config, v2.0a1
|
|
# Copyright 2014, Xenese Labs/Sicron-Perion XNF
|
|
#==========================================================
|
|
|
|
#Directory where notes will be stored
|
|
ROOTDIR=$HOME/.sns
|
|
BASEDIR=$ROOTDIR/notes
|
|
|
|
#File extension to use (for listing notes)
|
|
EXT=note
|
|
|
|
#Preferred Editor
|
|
EDITOR=vim
|
|
|
|
#Encryption
|
|
#WARNING: ANY PREVIOUSLY UNENCRYPTED NOTES WILL BE LOST
|
|
ENCRYPTION="FALSE"
|
|
ENC_KEY=""
|
|
EOF
|
|
|
|
chmod 600 $ROOTDIR/sns.conf
|
|
}
|
|
|
|
|
|
function pause {
|
|
read -p " Press [Enter] to continue."
|
|
echo ""
|
|
}
|
|
|