# Check if the given program is installed. Returns 0 if it exists, 1
# otherwise; so it can be used in if.
installed() {
- which $1 2>&1 | perl -ne 'if (not m{^/}) { exit 1 }'
+ which $1 2>&1 | perl -e '$_ = <>; if (not m{^/}) { exit 1 }'
}
# Print the current OS. The following OS are supported at the moment: