diff --git a/abra b/abra index a0921b6..9ef7453 100755 --- a/abra +++ b/abra @@ -401,16 +401,18 @@ require_bash_4() { fi } -require_pwqgen() { - if ! type pwqgen > /dev/null 2>&1; then - error "pwqgen program is not installed" +require_binary() { + if ! type "$1" > /dev/null 2>&1; then + error "'$1' program is not installed" fi } +require_pwqgen() { + require_binary pwqgen +} + require_wget() { - if ! type wget > /dev/null 2>&1; then - error "wget program is not installed" - fi + require_binary wget } require_abra_dir() { @@ -1397,7 +1399,7 @@ sub_app_secret_generate(){ PWGEN="${abra__cmd_:-pwqgen}" fi - echo "SECRET: $SECRET, VERSION $VERSION, PW $PW, ALL $abra___all" + debug "SECRET: $SECRET, VERSION $VERSION, PW $PWGEN, ALL $abra___all" if [ -z "$SECRET" ] || [ -z "$VERSION" ] && [ "$abra___all" == "false" ]; then error "Required arguments missing"