Linting
This commit is contained in:
@@ -46,7 +46,7 @@ if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
# All is good. If any previously unencrypted notes exist, encrypt them.
|
||||
# No harm in extra security.
|
||||
else
|
||||
find . -type f -name "*.$EXT" | grep -v "gpg" | while read TMP_NOTE; do
|
||||
find . -type f -name "*.$EXT" | grep -v "gpg" | while read -r TMP_NOTE; do
|
||||
NOTE="${TMP_NOTE%.$EXT}.gpg.$EXT"
|
||||
encrypt
|
||||
if [ -r "$NOTE" ]; then
|
||||
@@ -65,10 +65,10 @@ else
|
||||
if [ ! -r "$NOTES_DIR"/.do_not_decrypt ]; then
|
||||
if [ -n "$(find "$NOTES_DIR" -type f -name "*.gpg.$EXT" > /dev/null)" ]; then
|
||||
while true; do
|
||||
read -p "Would you like to de-encrypt previously encrypted notes? " YN
|
||||
read -rp "Would you like to de-encrypt previously encrypted notes? " YN
|
||||
case $YN in
|
||||
[Yy]* )
|
||||
read -s -p "Please enter your passphrase: " PASSPHRASE
|
||||
read -s -rp "Please enter your passphrase: " PASSPHRASE
|
||||
cd "$NOTES_DIR"
|
||||
find . -type f -name "*.gpg.$EXT" | while read -r NOTE; do
|
||||
gpg\
|
||||
@@ -101,9 +101,9 @@ fi
|
||||
#==============================================================================
|
||||
# Stage 2: Argument Parsing
|
||||
#==============================================================================
|
||||
if [ -z "$1" ]; then help; exit 20
|
||||
if [ ! "$@" ]; then help; exit 20
|
||||
else
|
||||
ARGS=("${@}")
|
||||
ARGS=("$@")
|
||||
declare -i INDEX
|
||||
INDEX=0
|
||||
for ARG in "$@"; do
|
||||
|
||||
Reference in New Issue
Block a user