First shot at removing eval

This commit is contained in:
2023-03-21 10:58:38 -04:00
parent 1a5f2e3222
commit cc6e866557

View File

@@ -116,9 +116,9 @@ askOk() {
} }
execute() { execute() {
if debug "$*"; then if debug "$*"; then
eval "$*" "$@"
else else
eval "$* &>/dev/null" "$@" &>/dev/null
fi fi
} }
@@ -142,7 +142,7 @@ parseInput() {
declare -g CREATEREPO_USER="${CREATEREPO_USER:-$USER}" declare -g CREATEREPO_USER="${CREATEREPO_USER:-$USER}"
if [[ $# -eq 0 ]] || if [[ $# -eq 0 ]] ||
[[ $# -eq 1 && " $1 " =~ ^( --debug | -d )$ ]] && [[ $# -eq 1 && " $1 " =~ ^( --debug | -d | -y | --yes )$ ]] &&
[[ $ID != "unknown" ]]; then [[ $ID != "unknown" ]]; then
REPO_INSTALL_SWITCH=1 REPO_INSTALL_SWITCH=1
elif [[ $# -eq 1 && " $1 " =~ ^( --compat )$ ]]; then elif [[ $# -eq 1 && " $1 " =~ ^( --compat )$ ]]; then