Permalink
Browse files

Updated install script

  • Loading branch information...
1 parent 3e16b57 commit c08a3b2db2c539ea45f603852e1517f1b7a543aa @CasEbbers CasEbbers committed Jan 19, 2012
Showing with 63 additions and 48 deletions.
  1. +4 −7 README
  2. +59 −0 devcms-install.sh
  3. +0 −41 devcms-template.rb
View
11 README
@@ -1,13 +1,10 @@
DevCMSCore
=============
-Introduction goes here.
+Installation:
+Generate a new Rails app, then execute:
-Example
-=======
+bash <(curl -s https://raw.github.com/nedforce/devcms-core/master/devcms-install.sh)
-Example goes here.
-
-
-Copyright (c) 2010 [name of plugin creator], released under the MIT license
+and follow the further instructions.
View
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# Check for Git
+if [ ! -x `which git` ]; then
+ echo "DevCMS requires Git. Please install Git."
+ exit
+fi
+
+# Check for Rails version
+if [ ! "`rails -v`" = "Rails 2.3.14" ]; then
+ echo "DevCMS requires Ruby on Rails version 2.3.14. Please execute 'gem install rails -v=2.3.14'"
+ exit
+fi
+
+# Check for Rails app
+if [ ! -f "config/boot.rb" ]; then
+ echo "Please run this installer from within a (new) Rails application."
+ exit
+fi
+
+git init
+
+# Install Engines
+echo "==> Installing Engines plugin"
+script/plugin install git://github.com/lazyatom/engines.git
+# Install DevCMS
+echo "==> Installing DevCMS"
+git submodule add git://github.com/nedforce/devcms-core.git vendor/plugins/devcms-core
+
+# Install gems
+echo "==> Installing required gems"
+gem install faker --version "0.3.1"
+gem install pg --version "~> 0.11.0"
+gem install rcov --version "~> 0.9.11"
+gem install ferret --version "~> 0.11.6"
+gem install soap4r
+gem install haml
+gem install rmagick
+gem install dsl_accessor --version "0.3.3"
+rake devcms:install
+rake gems:install
+
+echo "==> Committing changes"
+git add .
+git commit -a -m "Initial commit"
+
+cat <<@
+
+Done! Please edit config/database.yml to suit your needs. Then execute db:create
+and db:migrate to setup the database. From there you have two choices:
+
+ 1. Populate the database with a small structure using 'rake db:populate:all'
+
+ 2. Seed the database with a minimal structure using 'rake db:seed'
+
+From there on you can run the server and log in with the username 'webmaster'
+and the password 'admin'.
+
+@
View
@@ -1,41 +0,0 @@
-# Init git repository
-git :init
-
-# Install the Engines plugin
-plugin 'engines', :git => 'git://github.com/lazyatom/engines.git'
-
-# Add the devcms submodule
-git :submodule => 'add git://github.com/nedforce/devcms-core.git vendor/plugins/devcms-core'
-run 'cd vendor/plugins/devcms-core;'
-
-# Install devcms
-rake('devcms:install')
-
-# Copy database.yml for distribution use
-run "cp config/database.example.yml config/database.yml"
-
-# Set up .gitignore files
-run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
-run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore}
-file '.gitignore', <<-END
-.DS_Store
-log/*.log
-tmp/**/*
-config/database.yml
-db/*.sqlite3
-vendor/rails
-END
-
-# Remove broken initializer
-run "rm config/initializers/cookie_verification_secret.rb"
-
-# Final install steps
-rake('gems:install')
-
-# Commit all work so far to the repository
-git :add => '.'
-git :commit => "-a -m 'Initial commit'"
-
-# Success!
-puts "Success! Now, configure your database in config/database.yml, create the database using 'rake db:create' and finally run 'rake db:migrate'."
-puts "Afterwards, you can populate your database by running 'rake db:populate:all'."

0 comments on commit c08a3b2

Please sign in to comment.