summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyush Agarwal <ayush@fastmail.in>2021-09-08 00:31:20 +0530
committerAyush Agarwal <ayush@fastmail.in>2021-09-08 00:31:20 +0530
commit0b9f1ec9cbc513dd41a23998f96d10482ceb7444 (patch)
tree69596f1d7dc8434eef423f2172f4bc4066d4dece
parentc1530dbf24d7a5203915706c584720d1ed9cd26a (diff)
moved password-store directory validation in main
-rwxr-xr-xtessen12
1 files changed, 6 insertions, 6 deletions
diff --git a/tessen b/tessen
index d679084..0bf76de 100755
--- a/tessen
+++ b/tessen
@@ -72,12 +72,6 @@ USERNAME=""
PASSWORD=""
CHOICE=""
-# exit if the password store directory doesn't exist
-if ! [[ -d "$PASS_STORE" ]]; then
- notify-send "password store not found"
- exit 1
-fi
-
# display and get the shortened path of the password file
get_pass_file() {
local tmp_pass_1 tmp_pass_2 tmp_pass_3
@@ -213,6 +207,12 @@ clean() {
}
main() {
+ # exit if the password store directory doesn't exist
+ if ! [[ -d "$PASS_STORE" ]]; then
+ notify-send "password store not found"
+ exit 1
+ fi
+
# parse any options given by the user
while getopts ':hab:s:' opt; do
case "$opt" in