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