summaryrefslogtreecommitdiff
path: root/src/stats.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/stats.sh')
-rw-r--r--src/stats.sh23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/stats.sh b/src/stats.sh
index 61eb3ef..8c2c1be 100644
--- a/src/stats.sh
+++ b/src/stats.sh
@@ -3,20 +3,15 @@
show_xipkg_stats () {
printf "${LIGHT_CYAN}${XI}${BLUE}Pkg ${LIGHT_CYAN}$VERSION ${BLUE}on ${LIGHT_BLUE}%s\n" $(cat /etc/hostname)
echo
- printf "${LIGHT_BLACK}%-7s%*s/%s\n" "repo" 10 "installed" "total"
-
- for repo in ${REPOS}; do
-
- local total=0
- local installed=0
- for package in $(list | grep "^$repo/"); do
- total=$((total+1))
- name=${package#$repo/}
- [ -d ${INSTALLED_DIR}/${name} ] &&
- installed=$((installed+1))
- done
-
- printf "${LIGHT_WHITE}%-7s${GREEN}%*s${LIGHT_WHITE}/%s\n" $repo 10 $installed $total
+ printf "${LIGHT_BLACK}%-7s%*s/%s\n" " " 10 "installed" "total"
+ local total=0
+ local installed=0
+ for package in $(list); do
+ total=$((total+1))
+ [ -d ${INSTALLED_DIR}/${package} ] &&
+ installed=$((installed+1))
done
+
+ printf "${LIGHT_WHITE}%-7s${GREEN}%*s${LIGHT_WHITE}/%s\n" "packages" 10 $installed $total
}