Temporary commit (moving computers)
This commit is contained in:
@@ -152,7 +152,10 @@ function help {
|
||||
}
|
||||
function list(){
|
||||
# This function, given a folder, $NOTE, will list the contents of $NOTE.
|
||||
cd "$(dirname "$NOTES_DIR/$NOTE")"
|
||||
# If not given a folder, it will list all notes in the store.
|
||||
|
||||
if [ -z "$NOTEBOOK" ]; then NOTEBOOK="."; fi
|
||||
cd "$(dirname "$NOTES_DIR/$NOTEBOOK")"
|
||||
find . -type f -name "*$EXT" | while read file; do
|
||||
printf "%s\n" "$file"
|
||||
done
|
||||
|
||||
@@ -94,11 +94,12 @@ fi
|
||||
#==============================================================================
|
||||
# Stage 2: Argument Parsing
|
||||
#==============================================================================
|
||||
NOTE=""
|
||||
if [ -z "$1" ]; then help; exit 20
|
||||
else
|
||||
ARGS="$@"
|
||||
declare -i INDEX
|
||||
INDEX=0
|
||||
while getopts ":cCd:xe:xl:xp:xhi" ARG $VCTL; do
|
||||
while getopts ":cCd:e:lp:hi" ARG $VCTL; do
|
||||
let INDEX++
|
||||
case "$ARG" in
|
||||
c|--create)
|
||||
@@ -123,7 +124,10 @@ else
|
||||
OP="TRUE"
|
||||
;;
|
||||
l|--list)
|
||||
LIST="TRUE"
|
||||
echo "${ARGS[$INDEX]}"
|
||||
NOTEBOOK="${ARGS[$INDEX]}"
|
||||
|
||||
LIST="TRUE"
|
||||
OP="TRUE"
|
||||
;;
|
||||
p|--print)
|
||||
@@ -160,10 +164,10 @@ fi
|
||||
fi
|
||||
# All options not requiring a note to be specified have been dealt
|
||||
# with; if one isn't specified, exit on ERR_NO_NOTE.
|
||||
if [ -z "$NOTE" ]; then
|
||||
printf "$RED_COLOR!$RESET_COLOR %s\n" "No note specified."
|
||||
exit 30
|
||||
fi
|
||||
#if [ -z "$NOTE" ]; then
|
||||
# printf "$RED_COLOR!$RESET_COLOR %s\n" "No note specified."
|
||||
# exit 30
|
||||
#fi
|
||||
|
||||
if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
SESSION_ID="$RANDOM" #SESSION_ID later becomes the temporary filename
|
||||
|
||||
Reference in New Issue
Block a user