First try at auto-encrypting notes when encryption is turned on
This commit is contained in:
@@ -20,5 +20,16 @@ if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
>&2 printf " $RED_COLOR!$RESET_COLOR %s\n\t%s\n"\
|
||||
"No GPG recipient was provided in $CONFIG_FILE. "
|
||||
exit 110
|
||||
else
|
||||
cd "$NOTES_DIR"
|
||||
find . -type f -name "*.$EXT" | grep -v "gpg" | while read TMP_NOTE; do
|
||||
NOTE="${TMP_NOTE%.$EXT}.gpg.$EXT"
|
||||
echo $NOTE
|
||||
encrypt
|
||||
if [ -r $NOTE ]; then
|
||||
rm $TMP_NOTE
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user