This commit is contained in:
dylan araps 2015-12-31 13:19:30 +11:00
parent 431644d61d
commit 5fbdfa35d6
1 changed files with 5 additions and 8 deletions

View File

@ -146,7 +146,7 @@ getpackages () {
case $os in case $os in
'Arch Linux'|'Parabola GNU/Linux-libre'|'Manjaro'|'Antergos') \ 'Arch Linux'|'Parabola GNU/Linux-libre'|'Manjaro'|'Antergos') \
packages=$(pacman -Q | wc -l) ;; packages=$(pacman -Q | wc -l) ;;
'Ubuntu'|'Mint'|'Debian'|'Kali Linux') \ 'Ubuntu'|'Mint'|'Debian'|'Kali Linux'|'Deepin Linux') \
packages=$(dpkg --get-selections | grep -v deinstall$ | wc -l) ;; packages=$(dpkg --get-selections | grep -v deinstall$ | wc -l) ;;
'Slackware') \ 'Slackware') \
packages=$(ls -1 /var/log/packages | wc -l) ;; packages=$(ls -1 /var/log/packages | wc -l) ;;
@ -313,10 +313,7 @@ usage () {
# Args {{{ # Args {{{
# Args for argument in "$@"; do
args="$@"
for argument in $args; do
case $1 in case $1 in
# Info # Info
--title) title="$2" ;; --title) title="$2" ;;
@ -466,14 +463,14 @@ underline=$(printf %"${#title}"s |tr " " "-")
tput civis tput civis
# Print the title and underline # Print the title and underline
printf "$pad$bold$title_color$title$clear \n" printf "%s\n" "$pad$bold$title_color$title$clear"
printf "$pad$colon_color$underline$clear \n" printf "%s\n" "$pad$colon_color$underline$clear"
# Custom printf function to make it easier to edit the info lines. # Custom printf function to make it easier to edit the info lines.
printinfo () { printinfo () {
printf "$pad$bold$subtitle_color$1$clear" printf "$pad$bold$subtitle_color$1$clear"
printf "$colon_color:$clear " printf "$colon_color:$clear "
printf "$info_color$2$clear \n" printf "%s\n" "$info_color$2$clear"
} }
# Disable line wrap # Disable line wrap