Skip to content

Commit

Permalink
Simplify if-else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
toluschr committed Jun 10, 2024
1 parent 773b0ae commit b1b8f47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xdeb
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,9 @@ xbps-rindex -a "${out}.${archs}.xbps"

if [ "${XDEB_REFUSE}" = true ]; then
log_crit "Errors occurred. Do not install the package on this system!"
return 1
elif [ "${XDEB_OPT_INSTALL}" = true ]; then
"$(command -v sudo doas 2>/dev/null | head -n1)" xbps-install -R "${XDEB_BINPKGS#"${PWD}/"}" "${out}"
else
log_info "Install using \`xbps-install -R ${XDEB_BINPKGS#"${PWD}/"} ${out}\`"
fi

[ "${XDEB_REFUSE}" = true ] && return 1

0 comments on commit b1b8f47

Please sign in to comment.