switched to binary-based package manager checks

This commit is contained in:
Adrian Cole 2012-08-01 11:34:51 -07:00
parent 1abcffb612
commit b478b02bbe
9 changed files with 28 additions and 28 deletions

View File

@ -123,9 +123,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"
@ -168,9 +168,9 @@ function installOpenJDK() {
if [ -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
echo reusing JAVA_HOME $JAVA_HOME
else
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
apt-get-update && apt-get-install openjdk-6-jdk
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
yum-install java-1.6.0-openjdk-devel
else
abort "we only support apt-get and yum right now... please contribute"

View File

@ -123,9 +123,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"
@ -168,9 +168,9 @@ function installOpenJDK() {
if [ -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
echo reusing JAVA_HOME $JAVA_HOME
else
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
apt-get-update && apt-get-install openjdk-6-jdk
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
yum-install java-1.6.0-openjdk-devel
else
abort "we only support apt-get and yum right now... please contribute"

View File

@ -123,9 +123,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"
@ -168,9 +168,9 @@ function installOpenJDK() {
if [ -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
echo reusing JAVA_HOME $JAVA_HOME
else
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
apt-get-update && apt-get-install openjdk-6-jdk
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
yum-install java-1.6.0-openjdk-devel
else
abort "we only support apt-get and yum right now... please contribute"

View File

@ -122,9 +122,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"

View File

@ -1,7 +1,7 @@
function installGit() {
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_cmd_or_install_package_apt git git-core
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_cmd_or_install_package_yum git git-core
else
abort "we only support apt-get and yum right now... please contribute!"

View File

@ -32,9 +32,9 @@ function installOpenJDK() {
if [ -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
echo reusing JAVA_HOME $JAVA_HOME
else
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
apt-get-update && apt-get-install openjdk-6-jdk
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
yum-install java-1.6.0-openjdk-devel
else
abort "we only support apt-get and yum right now... please contribute"

View File

@ -38,9 +38,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"

View File

@ -123,9 +123,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"
@ -135,9 +135,9 @@ function setupPublicCurl() {
return 0
}
function installGit() {
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_cmd_or_install_package_apt git git-core
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_cmd_or_install_package_yum git git-core
else
abort "we only support apt-get and yum right now... please contribute!"

View File

@ -123,9 +123,9 @@ function ensure_can_resolve_public_dns() {
function setupPublicCurl() {
ensure_hostname_in_hosts
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
ensure_netutils_apt
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
ensure_netutils_yum
else
abort "we only support apt-get and yum right now... please contribute!"
@ -168,9 +168,9 @@ function installOpenJDK() {
if [ -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
echo reusing JAVA_HOME $JAVA_HOME
else
if hash apt-get 2>/dev/null; then
if which dpkg &> /dev/null; then
apt-get-update && apt-get-install openjdk-6-jdk
elif hash yum 2>/dev/null; then
elif which rpm &> /dev/null; then
yum-install java-1.6.0-openjdk-devel
else
abort "we only support apt-get and yum right now... please contribute"