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: ### Required dependencies:
- `Bash 3.0+` - `Bash 3.0+`
- Alpine Linux: You also need `ncurses`.
- `xprop` \[1\] - `xprop` \[1\]
- `procps-ng` - `procps-ng`
- Not required on OS X - 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 case "$os" in
"Linux") "Linux")
case "$distro" in 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 | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
uptime=${uptime/ / } uptime=${uptime/ / }
;; ;;
@ -618,6 +618,9 @@ getpackages () {
elif type -p nix-env >/dev/null 2>&1; then elif type -p nix-env >/dev/null 2>&1; then
packages="$(ls -d -1 /nix/store/*/ | wc -l)" 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 elif type -p pacman-g2 >/dev/null 2>&1; then
packages="$(pacman-g2 -Q | wc -l)" packages="$(pacman-g2 -Q | wc -l)"
@ -2035,7 +2038,7 @@ colors () {
setcolors 3 2 4 5 7 setcolors 3 2 4 5 7
;; ;;
"CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"*) "CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"* | "Alpine"*)
setcolors 4 5 7 setcolors 4 5 7
;; ;;