Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit f1d1d24

Browse files
committed
Simplify dependency check command
1 parent 566477c commit f1d1d24

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

cachyos-deb.sh

+1-7
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ check_deps() {
2323
# List of dependencies to check
2424
dependencies=(git libncurses-dev curl gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm bc rsync)
2525

26-
# Function to check if a package is installed
27-
is_installed() {
28-
dpkg -l | grep "^ii" | grep -q "$1"
29-
return $?
30-
}
31-
3226
# Iterate over dependencies and check each one
3327
for dep in "${dependencies[@]}"; do
34-
if is_installed "$dep"; then
28+
if dpkg -s "$dep" 2>/dev/null 1>&2; then
3529
#echo "Package $dep is installed."
3630
continue
3731
else

0 commit comments

Comments
 (0)