2010-09-16 00:54:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# output or sourcable
|
|
|
|
|
|
|
|
# OS
|
|
|
|
cdist_explore_os()
|
|
|
|
{
|
|
|
|
[ -f /etc/arch-release ] && echo archlinux
|
|
|
|
|
|
|
|
[ -f /etc/debian_version ] && echo debian
|
|
|
|
|
|
|
|
grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null && echo ubuntu
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-09-16 01:00:02 +00:00
|
|
|
# could work, if cdist_explore_os would be a different program
|
|
|
|
# nope, does not work, set -x output is not sourcable...
|
|
|
|
[ "$1" = "-o" ] && set -x
|
|
|
|
|
2010-09-16 00:54:36 +00:00
|
|
|
CDIST_OS="$(cdist_explore_os)"
|