Fix syntax error in check_arg() function

This commit is contained in:
DJ Lucas 2019-04-12 22:32:02 -05:00
parent 31e66e0c74
commit 4b171eb701
2 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@
- Remove unused variables saarg, csarg, and smarg in - Remove unused variables saarg, csarg, and smarg in
get_trust_values() function get_trust_values() function
- Remove unused CERTLIST variable in copy-trust-modifications - Remove unused CERTLIST variable in copy-trust-modifications
- Fix syntax error in check_arg() function
- Correct STDERR redirection in multiple functions - Correct STDERR redirection in multiple functions
1.2 - Use md5sum values for anchors.txt to detect p11-kit changes 1.2 - Use md5sum values for anchors.txt to detect p11-kit changes
- Added get_p11_label() function to get reliable label values - Added get_p11_label() function to get reliable label values

View File

@ -227,8 +227,8 @@ function get_args(){
} }
function check_arg(){ function check_arg(){
echo "${2}" | grep -v "^-" > /dev/null echo "${2}" | grep "^-" > /dev/null
if [ -z "$?" -o ! -n "$2" ]; then if [ "$?" == "0" -o ! -n "$2" ]; then
echo "Error: $1 requires a valid argument." echo "Error: $1 requires a valid argument."
exit 1 exit 1
fi fi