Corrected bad function calls

This commit is contained in:
Jon-William Lewis
2017-05-08 12:42:59 -05:00
parent d97addc653
commit fce571e2a9

8
sns.sh
View File

@@ -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