mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-11-29 20:58:27 +00:00
check for dirs instead of commands for package counting
This commit is contained in:
1 parent
d68f934833
commit
b7e8e39f56
1 file changed
+4
-2
+4
-2
@@ -3,6 +3,8 @@
|
|||||||
# this is my attempt at trying to make a fetch using only posix shell
|
# this is my attempt at trying to make a fetch using only posix shell
|
||||||
# and as little if none external utilities as I can.
|
# and as little if none external utilities as I can.
|
||||||
#
|
#
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
@@ -30,14 +32,14 @@ done
|
|||||||
|
|
||||||
## Packages
|
## Packages
|
||||||
# horribly inefficient, I know.
|
# horribly inefficient, I know.
|
||||||
command -v pacman-key >/dev/null 2>&1 && {
|
[ -d /var/lib/pacman/local ] && {
|
||||||
pkgs=0
|
pkgs=0
|
||||||
for i in /var/lib/pacman/local/*; do
|
for i in /var/lib/pacman/local/*; do
|
||||||
pkgs=$(( pkgs + 1 ))
|
pkgs=$(( pkgs + 1 ))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
command -v xbps-install >/dev/null 2>&1 && {
|
[ -d /var/db/xbps ] && {
|
||||||
pkgs=0
|
pkgs=0
|
||||||
for i in /var/db/xbps/*; do
|
for i in /var/db/xbps/*; do
|
||||||
pkgs=$(( pkgs + 1 ))
|
pkgs=$(( pkgs + 1 ))
|
||||||
|
|||||||
Reference in new issue
Block a user