Skip to content

Commit 36e6824

Browse files
committed
[update] : Do not use test command
1 parent 11c4f2d commit 36e6824

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

build.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,7 @@ prepare_env() {
324324
if [[ "${nodepend}" = false ]]; then
325325
local _check_failed=false _pkg _result=0
326326
msg_info "Checking dependencies ..."
327-
if ! pacman -Qq pyalpm > /dev/null 2>&1; then
328-
msg_error "pyalpm is not installed." 1
329-
fi
327+
! pacman -Qq pyalpm > /dev/null 2>&1 && msg_error "pyalpm is not installed." 1
330328
for _pkg in "${dependence[@]}"; do
331329
eval "${tools_dir}/package.py" "${_pkg}" "$( [[ "${debug}" = false ]] && echo "> /dev/null")" || _result="${?}"
332330
if (( _result == 3 )) || (( _result == 4 )); then
@@ -340,7 +338,7 @@ prepare_env() {
340338
# Load loop kernel module
341339
if [[ "${noloopmod}" = false ]]; then
342340
[[ ! -d "/usr/lib/modules/$(uname -r)" ]] && msg_error "The currently running kernel module could not be found.\nProbably the system kernel has been updated.\nReboot your system to run the latest kernel." "1"
343-
[[ -z "$(lsmod | getclm 1 | grep -x "loop")" ]] && modprobe loop
341+
lsmod | getclm 1 | grep -x "loop" || modprobe loop
344342
fi
345343

346344
# Check work dir

0 commit comments

Comments
 (0)