diff --git a/bin/dotfiles b/bin/dotfiles index 7c269c75bf..c63427ae96 100755 --- a/bin/dotfiles +++ b/bin/dotfiles @@ -43,10 +43,13 @@ function is_osx() { [[ "$OSTYPE" =~ ^darwin ]] || return 1 } function is_ubuntu() { - [[ "$(cat /etc/issue 2> /dev/null)" =~ Ubuntu ]] || return 1 + type lsb_release &>/dev/null && [[ "$(lsb_release -s -i)" =~ Ubuntu ]] || return 1 +} +function is_debian() { + type lsb_release &>/dev/null && [[ "$(lsb_release -s -i)" =~ Debian ]] || return 1 } function get_os() { - for os in osx ubuntu; do + for os in osx ubuntu debian; do is_$os; [[ $? == ${1:-0} ]] && echo $os done }