Skip to content
This repository
Jonne Haß jhass
executable file 123 lines (84 sloc) 4.012 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
#!/usr/bin/env bash

#### ####
# #
# minimal required functions to load the rest... #
# #
#### ####


# ... let's hope nobody hijacks githubs DNS while this runs :P
D_REMOTE_BASE_URL="https://raw.github.com/diaspora/diaspora/develop/"

# ruby environment
D_REMOTE_ENV_PATH="script/env/ruby_env"

# installer files
D_INSTALL_SCRIPT="script/install.sh"
D_INSTALL_DEFAULTS_PATH="script/install/defaults"
D_INSTALL_REMOTE_VAR_READER_PATH="script/install/remote_var_reader"
D_INSTALL_PATH_SANITIZER_PATH="script/install/path_sanitizer"
D_INSTALL_FUNCTIONS_PATH="script/install/functions"
D_INSTALL_SETUP_PATH="script/install/setup"

# fetch a remote script containing functions and eval them into the local env
include_remote() {
  _remote_include=$1
  __TMP=$(curl -L $_remote_include)
  eval "$__TMP"
}


include_remote "$D_REMOTE_BASE_URL$D_INSTALL_DEFAULTS_PATH"
include_remote "$D_REMOTE_BASE_URL$D_INSTALL_REMOTE_VAR_READER_PATH"
include_remote "$D_REMOTE_BASE_URL$D_INSTALL_PATH_SANITIZER_PATH"
include_remote "$D_REMOTE_BASE_URL$D_INSTALL_FUNCTIONS_PATH"
include_remote "$D_REMOTE_BASE_URL$D_INSTALL_SETUP_PATH"

read_var_remote "ruby_version" "D_RUBY_VERSION"


#### ####
# #
# define some overly long message strings here... #
# #
#### ####

define RVM_MSG <<'EOT'
RVM was not found on your system (or it isn't working properly).
It is higly recommended to use it, since it's making it extremely easy
to install, manage and work with multiple ruby environments.

For more details check out https://rvm.io//
EOT


define JS_RT_MSG <<'EOT'
This script was unable to find a JavaScript runtime compatible to ExecJS on
your system. We recommend you install either Node.js or TheRubyRacer, since
those have been proven to work.

Node.js -- http://nodejs.org/
TheRubyRacer -- https://github.com/cowboyd/therubyracer

For more information on ExecJS, visit
-- https://github.com/sstephenson/execjs
EOT

define DATABASE_CHK_MSG << 'EOT'
You can now check the generated database config file in './config/database.yml'
and see if the specified values are correct.

Please make sure the database server is started and the credentials you
specified are working. This script will populate the database in a later step.

EOT

define WELCOME_MSG <<'EOT'
#####################################################################

DIASPORA* INSTALL SCRIPT

----

This script will guide you through the basic steps
to get a DEVELOPMENT setup of Diaspora* up and running

For a PRODUCTION installation, please do *not* use this script!
Follow the guide in our wiki, instead:
-- http://wiki.diasporafoundation.org/Installation_guides

#####################################################################

EOT

define GOODBYE_MSG <<EOT
#####################################################################

It worked! :)

Now, you should have a look at

- config/database.yml and
- config/diaspora.yml

and change them to your liking. Then you should be able to
start Diaspora* in development mode with:

\`rails s\`


For further information read the wiki at $D_WIKI_URL
or join us on IRC $D_IRC_URL

EOT


#### ####
# #
# do it! #
# #
#### ####

diaspora_setup
Something went wrong with that request. Please try again.