All pastes #1861877 Raw Edit

Miscellany

public shellscript v1 · immutable
#1861877 ·published 2010-04-15 14:35 UTC
rendered paste body
# Distro Detection - Begindetectdistro () {  if [[ -z $distro ]]; then    distro="Unknown"    if grep -i debian /etc/lsb-release >/dev/null 2>&1; then distro="Debian"; fi    if grep -i ubuntu /etc/lsb-release >/dev/null 2>&1; then distro="Ubuntu"; fi    if grep -i mint /etc/lsb-release >/dev/null 2>&1; then distro="Linux Mint"; fi    if [ -f /etc/arch-release ]; then distro="Arch Linux"; fi    if [ -f /etc/fedora-release ]; then distro="Fedora"; fi    if [ -f /etc/redhat-release ]; then distro="Red Hat Linux"; fi    if [ -f /etc/slackware-version ]; then distro="Slackware"; fi    if [ -f /etc/SUSE-release ]; then distro="SUSE"; fi    if [ -f /etc/mandrake-release ]; then distro="Mandrake"; fi    if [ -f /etc/mandriva-release ]; then distro="Mandriva"; fi    if [ -f /etc/crunchbang-lsb-release ]; then distro="Crunchbang"; fi    if [ -f /etc/gentoo-release ]; then distro="Gentoo"; fi    if [ -f /var/run/dmesg.boot ] && grep -i bsd /var/run/dmesg.boot; then distro="BSD"; fi    if [ -f /usr/share/doc/tc/release.txt ]; then distro="Tiny Core"; fi  fi  [ "$verbosity" -eq "1" ] && verboseOut "Finding distro...found as '$distro'"}