Sha256: e3465436fb16d81592d33f02e05401d77f423c8d453819b658f0e49c1667f610

Contents?: true

Size: 1.37 KB

Versions: 24

Compression:

Stored size: 1.37 KB

Contents

#!/bin/sh

function puts() {
  echo -e $1 >&2
}

function install_package() {
if which pacman > /dev/null; then
  if [ -z "$(pacman -Ss "^$1\$" | grep installed)" ]; then
    puts "Installing $1"
    sudo pacman -S --noconfirm $1
  fi
else
  puts "Please install $1 from your operating system repository."
fi
}

function install_gem() {
if which gem > /dev/null; then
  if [ -z "$(gem list -l "^$1\$")" ]; then
    puts "Installing $1"
    gem install --no-ri --no-rdoc $1
  fi
else
  puts "Please install $1 via rubygems."
fi
}

function install_node() {
if which npm > /dev/null; then
  if [ -z "$(npm list -g $1 | grep bower)" ]; then
    puts "Installing $1"
    npm install -g $1 
  fi
else
  puts "Please install $1 via npm"
fi
}

function file_exist() {
if [ -f $1 ]; then
  puts "$2"
  return 0
else
  puts "Warning file \"$1\" does not exist. Maybe this can cause problems during bootstrapping"
  return 1
fi
}

echo "Bootstrapping development environment for application.." >&2

install_package ruby
install_package nodejs
install_package phantomjs

install_gem bundler
bundle install

file_exist "$HOME/.npmrc" "I found a .npmrc. Please make sure your npm configuration works with global install for users. If not please add something like \"prefix = /home/user/.local/share/npm\" to your .bashrc/.zshrc + export PATH=/home/user/.local/share/npm/bin:\$PATH"

install_node bower

bower install

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
test_server-0.5.2 script/bootstrap
test_server-0.5.1 script/bootstrap
test_server-0.5.0 script/bootstrap
test_server-0.4.1 script/bootstrap
test_server-0.4.0 script/bootstrap
test_server-0.3.7 script/bootstrap
test_server-0.3.6 script/bootstrap
test_server-0.3.5 script/bootstrap
test_server-0.3.4 script/bootstrap
test_server-0.3.2 script/bootstrap
test_server-0.3.1 script/bootstrap
test_server-0.2.4 script/bootstrap
test_server-0.2.3 script/bootstrap
test_server-0.2.2 script/bootstrap
test_server-0.2.1 script/bootstrap
test_server-0.2.0 script/bootstrap
test_server-0.1.2 script/bootstrap
test_server-0.1.1 script/bootstrap
test_server-0.1.0 script/bootstrap
local_pac-0.10.2 script/bootstrap