Replaced all [ p -o q ] with [ p ] || [ q ] and all [ p -a q ] with [ p ] && [ q ]
This commit is contained in:
committed by
Jon-William Lewis
parent
6e7f4c3e95
commit
337a1bf3a3
@@ -25,7 +25,7 @@
|
||||
#}
|
||||
|
||||
function create(){
|
||||
if [ -e "$NOTE" -o -e "${NOTE%.*}" ]; then
|
||||
if [ -e "$NOTE" ] || [ -e "${NOTE%.*}" ]; then
|
||||
printf "\nERROR: Note already exists\nHint: use -e to edit the note.\n"
|
||||
exit
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function delete(){
|
||||
if [ "$DELETE" == "TRUE" ]; then
|
||||
if [ -e "$NOTE" -o -e "${NOTE%.*}" ]; then
|
||||
if [ -e "$NOTE" ] || [ -e "${NOTE%.*}" ]; then
|
||||
if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
rm "${NOTE%.*}"
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function print(){
|
||||
if [ "$PRINT" == "TRUE" ]; then
|
||||
if [ -r "$NOTE" -o -r "${NOTE%.*}" ]; then
|
||||
if [ -r "$NOTE" ] || [ -r "${NOTE%.*}" ]; then
|
||||
if [ -z "$CREATE" ]; then
|
||||
if [ "$ENCRYPTION" == "TRUE" ]; then
|
||||
openssl enc -d -aes-256-cbc -in "${NOTE%.*}" -pass pass:"$ENC_KEY"
|
||||
|
||||
Reference in New Issue
Block a user