Added support for Alpine Linux

This commit is contained in:
Dylan 2016-03-09 22:43:52 +11:00
parent b00904adaf
commit 404c955e8f
3 changed files with 25 additions and 2 deletions

View File

@ -66,6 +66,7 @@ your distro's logo or any ascii art of your choice!
### Required dependencies:
- `Bash 3.0+`
- Alpine Linux: You also need `ncurses`.
- `xprop` \[1\]
- `procps-ng`
- Not required on OS X

19
ascii/distro/alpine Normal file
View File

@ -0,0 +1,19 @@
"\
${c1} \`---------------------\`
\`-----------------------\`
.-------------------------.
.---------------------------.
\`-----------..------------------\`
\`----------.\` \`.----\`\`-----------\`
---------.\` \`.. \`.---------
-------.\` \`..\` \`\`\` \`.-------
-----.\` \`.----.\` \`..\` \`.-----
---.\` \`.\` ------.\` \`..\` \`.---
---..\`..--.\`--------.\`\`..--.\`\`.----
\`---------------------------------\`
\`-------------------------------\`
.---------------------------.
.-------------------------.
\`-----------------------\`
\`---------------------\`
"

View File

@ -494,7 +494,7 @@ getuptime () {
case "$os" in
"Linux")
case "$distro" in
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"*)
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "Alpine Linux"*)
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
uptime=${uptime/ / }
;;
@ -618,6 +618,9 @@ getpackages () {
elif type -p nix-env >/dev/null 2>&1; then
packages="$(ls -d -1 /nix/store/*/ | wc -l)"
elif type -p apk >/dev/null 2>&1; then
packages="$(apk info | wc -l)"
elif type -p pacman-g2 >/dev/null 2>&1; then
packages="$(pacman-g2 -Q | wc -l)"
@ -2035,7 +2038,7 @@ colors () {
setcolors 3 2 4 5 7
;;
"CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"*)
"CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"* | "Alpine"*)
setcolors 4 5 7
;;