Closed lslvr closed 4 years ago
set -- $(echo ...) is useless use of echo.
set -- $(echo ...)
echo
It happens three times:
set -- $(echo /var/lib/pacman/local/*)
set -- $(echo /var/db/xbps/.*)
set -- $(echo /var/db/pkg/*/*)
There's no need of $(echo ...); the shell will expand the globbing patterns, and needs no "help".
$(echo ...)
Also, instead of three pkgs=$#'s, use only one after performing the checks (i.e., after line 136).
pkgs=$#
@vizs what have you say about your bad code.
jk.
Thank you, I'll fix it.
You're welcome. I love the idea of this script.
This is what happens when you shell script right after you wake up I guess :P
TL;DR:
set -- $(echo ...)
is useless use ofecho
.It happens three times:
set -- $(echo /var/lib/pacman/local/*)
set -- $(echo /var/db/xbps/.*)
set -- $(echo /var/db/pkg/*/*)
There's no need of
$(echo ...)
; the shell will expand the globbing patterns, and needs no "help".Also, instead of three
pkgs=$#
's, use only one after performing the checks (i.e., after line 136).