Merge pull request #727 from Takeya-Yuki/master

Fix KSLinux Support
This commit is contained in:
Dylan Araps 2017-05-24 12:56:43 +10:00 committed by GitHub
commit 7787ed2968
2 changed files with 24 additions and 3 deletions

11
ascii/distro/kslinux Normal file
View File

@ -0,0 +1,11 @@
${c1} K K U U RRRR ooo
K K U U R R o o
KKK U U RRRR o o
K K U U R R o o
K K UUU R R ooo
${c2} SSS AAA W W AAA
S A A W W A A
SSS AAAAA W W W AAAAA
S A A WW WW A A
SSS A A W W A A

View File

@ -106,6 +106,9 @@ get_distro() {
elif type -p tazpkg >/dev/null; then
distro="SliTaz $(< /etc/slitaz-release)"
elif type -p kpm > /dev/null; then
distro="KSLinux"
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
distro="Android $(getprop ro.build.version.release)"
@ -438,6 +441,9 @@ get_packages() {
type -p dpkg >/dev/null && \
packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))"
type -p kpm >/dev/null && \
packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))"
type -p pkgtool >/dev/null && \
packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))"
@ -1637,7 +1643,6 @@ get_term() {
while [[ -z "$term" ]]; do
parent="$(get_ppid "$parent")"
name="$(get_process_name "$parent")"
case "${name// }" in
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
@ -2295,10 +2300,10 @@ get_w3m_img_path() {
elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then
w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay"
elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then
w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay"
else
err "Image: w3m-img wasn't found on your system"
fi
@ -3070,6 +3075,11 @@ get_distro_colors() {
ascii_file="korora"
;;
"KSLinux"*)
set_colors 4 7 1
ascii_file="kslinux"
;;
"Kubuntu"*)
set_colors 4 7 1
ascii_file="kubuntu"