did a little more personal documentation
This commit is contained in:
parent
f58ac1ddcd
commit
df56737409
1 changed files with 5 additions and 0 deletions
5
notes
5
notes
|
@ -17,9 +17,13 @@ set -e
|
|||
|
||||
readonly NOTES_DIRECTORY="${NOTES_DIRECTORY:-${HOME}/notes}"
|
||||
readonly NOTES_EDITOR="${EDITOR}"
|
||||
#doc: looks like readonly means the variable gets set and won't be changed later in the script.
|
||||
#in this case it looks like the frist above sets the notes directory in the home directory
|
||||
#and the second points to the default text editor
|
||||
|
||||
readonly NOTES_FILE="$(date +%Y-%m).txt"
|
||||
readonly NOTES_PATH="${NOTES_DIRECTORY}/${NOTES_FILE}"
|
||||
#doc: first one sets the file name, second indicates the path to the directory
|
||||
|
||||
if [ ! -d "${NOTES_DIRECTORY}" ]; then
|
||||
while true; do
|
||||
|
@ -33,6 +37,7 @@ if [ ! -d "${NOTES_DIRECTORY}" ]; then
|
|||
esac
|
||||
done
|
||||
fi
|
||||
#doc: the ! -d checks if it does not exist then it asks if it should be made
|
||||
|
||||
if [ ${#} -eq 0 ]; then
|
||||
if [ -p "/dev/stdin" ]; then
|
||||
|
|
Loading…
Reference in a new issue