5 # neonskull [at] gmail.com
8 AUTHOR
="Pável Varela Rodríguez [aka NeOnsKuLL]"
12 echo "pacman-info v$VERSION"
13 echo "usage: `basename $0` [OPTION]
16 -cr|--configured-repos List the names of configured repos in your
19 -a|--all Calculates the total number of available
20 packages in your repos
22 -br|--by-repo Calculates the total number of available
25 -i|--installed Calculates the number of installed packages
27 -f|--full Generates a full Report
29 -h|--help Show this message
31 -v|--version Show version
35 [ "$#" -lt 1 ] && PARAM
="-h";
36 [ "$#" -gt 1 ] && PARAM
="*";
37 [ "$#" -eq 1 ] && PARAM
="$1";
41 echo -e "Repositories information (total of packages in repos): `pacman -Sl|wc -l`"
43 "-cr"|
"--configured-repos")
44 echo "Repositories information (name of configured repos):"
45 pacman
-Sl|
awk '{print $1}'|cut
-d"/" -f 2|
uniq -c|
awk '{print "* " $2}'
48 echo "Repositories information (number of packages by repo):"
49 pacman
-Sl|
awk '{print $1}'|cut
-d"/" -f 2|
uniq -c|
awk '{print ":: "$2 "\t-> " $1 "\tpkgs"}'
52 echo -e "System information (total of installed packages): `pacman -Q|wc -l`"
55 echo -e "Full Report about Repositories and Packages for Archlinux"
56 echo -e "Node name: `uname -n`\n"
65 echo -e "Generated using `$0 -v` by $AUTHOR"
71 echo "`basename $0` v$VERSION"
74 echo "Error! Unknown parameter."