Variable name reworking; laid foundation for GPG encryption (instead of OpenSSL)

This commit is contained in:
Jon-William Lewis
2016-01-25 17:20:05 -06:00
parent 908b93242c
commit 6a21731082
12 changed files with 180 additions and 102 deletions

View File

@@ -1,11 +1,15 @@
function list(){
if [ -d "$BASEDIR"/"$NOTEBOOK" ]; then
if [ -d "$BASE_DIR"/"$NOTEBOOK" ]; then
printf "\nNotes in %s:\n" "$(basename "$NOTEBOOK")"
NOTES=( $(find "$BASEDIR"/"$NOTEBOOK" -name "*.$EXT" -print0 | sed s:"$BASEDIR"/"$NOTEBOOK"/: " " :g | sed -e s:".$EXT"::g | tr "/" " ") )
NOTES=(
$(find "$BASE_DIR"/"$NOTEBOOK" -name "*.$EXT" -print0 |\
sed s:"$BASE_DIR"/"$NOTEBOOK"/: " " :g |\
sed -e s:".$EXT"::g | tr "/" " ")
)
let i=0
for NOTE in "${NOTES[@]}"; do
if [ -d "$BASEDIR"/"$NOTEBOOK"/"$NOTE" ]; then
if [ -d "$BASE_DIR"/"$NOTEBOOK"/"$NOTE" ]; then
if [ "$LAST_SECTION" != "$NOTE" ]; then
printf " Section: %s\n" "$NOTE"
fi