Corrected bad function calls
This commit is contained in:
8
sns.sh
8
sns.sh
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
XL_PRODUCT="Simple Note System"
|
||||
XL_VER="v2a"
|
||||
XL_VER="v2b"
|
||||
|
||||
# Environment Constants
|
||||
readonly SNS_STORE="$HOME/.local/sns"
|
||||
@@ -73,7 +73,7 @@ function sns_sanityCheck {
|
||||
SNS_EXIT="$SNS_ERR_DEPS"
|
||||
for DEP in "${MISSING_DEPS[@]}"; do
|
||||
local SNS_DEP_EC="\$ERR_NO_$DEP"
|
||||
printError "Dependency %s not in path." "$DEP";
|
||||
sns_printError "Dependency %s not in path." "$DEP";
|
||||
SNS_EXIT+=${!SNS_DEP_EC}
|
||||
done
|
||||
fi
|
||||
@@ -82,7 +82,7 @@ function sns_sanityCheck {
|
||||
SNS_PUBKEY="$(cat "$SNS_STORE/.pubkey")"
|
||||
elif ! sns_checkStore; then
|
||||
if [ "$(echo "${SNS_ACTION[@]}" | awk '{print $1;}')" != "sns_initStore" ]; then
|
||||
printError "The sns store does not exist."
|
||||
sns_printError "The sns store does not exist."
|
||||
printf " - %s\n" "Please run \`sns -i [gpg-key]\` to initialize sns."
|
||||
SNS_EXIT="$SNS_ERR_NO_STORE"
|
||||
fi
|
||||
@@ -171,7 +171,7 @@ function sns_argParse(){
|
||||
case "${ARGS[!OPTIND]}" in
|
||||
-i|-c|-e|-p|-d)
|
||||
if [ "${#ARGS}" -lt 2 ]; then
|
||||
printError "A required argument was not given."
|
||||
sns_printError "A required argument was not given."
|
||||
SNS_EXIT="$SNS_ERR_NS_ARGS"
|
||||
return
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user