Permalink
Browse files

requirements/ubunutu

  • Loading branch information...
1 parent 2b9532c commit 5e16dbf20b1180ed1edd14f84959b899df1e2307 @mpapis mpapis committed Jan 9, 2013
Showing with 51 additions and 0 deletions.
  1. +51 −0 scripts/functions/requirements/ubuntu
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+
+function requirements_ubuntu()
+{
+ typeset -a command_to_run command_flags
+ command_to_run=()
+ command_flags=()
+
+ while
+ (( $# ))
+ do
+ case "$1" in
+ (echo)
+ command_to_run+=( $1 )
+ shift
+ ;;
+ (force)
+ command_flags+=( --quiet --yes )
+ shift
+ ;;
+ (*)
+ break
+ ;;
+ esac
+ done
+
+ (( UID == 0 )) || command_to_run+=( sudo )
+
+ case "$1" in
+ (update-system)
+ "${command_to_run[@]}" apt-get "${command_flags[@]}" update
+ ;;
+ (jruby*head)
+ "${command_to_run[@]}" apt-get --no-install-recommends "${command_flags[@]}" install ant openjdk-6-jdk
+ ;;
+ (jruby*)
+ "${command_to_run[@]}" apt-get --no-install-recommends "${command_flags[@]}" install curl g++ openjdk-6-jre-headless
+ ;;
+ (ir*)
+ "${command_to_run[@]}" apt-get --no-install-recommends "${command_flags[@]}" install curl mono-2.0-devel
+ ;;
+ (opal)
+ "${command_to_run[@]}" apt-get --no-install-recommends "${command_flags[@]}" install nodejs npm
+ ;;
+ (*)
+ "${command_to_run[@]}" apt-get --no-install-recommends "${command_flags[@]}" install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config
+ ;;
+ esac
+}
+
+requirements_ubuntu "$@"

0 comments on commit 5e16dbf

Please sign in to comment.