diff --git a/installer/install.sh b/installer/install.sh --- a/installer/install.sh +++ b/installer/install.sh @@ -1,25 +1,10 @@ #!/bin/sh +#installation script for cafe-grader, for ubuntu 16.04 + echo "This script will install and configure Cafe grader." -RUBY_VERSION=2.1.2 -echo "This will install Ruby $RUBY_VERSION under RVM" - -echo "Installing required apts" - -sudo apt-get update -sudo apt-get install mysql-server mysql-client \ - g++ gcc apache2 libmysqlclient20 build-essential \ - git-core openssl libreadline6 libreadline6-dev \ - zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev \ - sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev \ - ncurses-dev automake libtool bison subversion \ - pkg-config curl nodejs unzip pyflakes ruby default-jdk \ - libmysqld-dev mercurial python-setuptools python-dev python3-numpy - -echo "Installing RVM" -curl -k -L https://get.rvm.io | bash -s stable -source ~/.rvm/scripts/rvm +RUBY_VERSION=2.3.7 echo "Installing Ruby $RUBY_VERSION in RVM" @@ -32,7 +17,7 @@ mkdir cafe_grader cd cafe_grader -git clone -q git://github.com/jittat/cafe-grader-web.git web +git clone -q git://github.com/cafe-grader-team/cafe-grader-web.git web echo "Configuring rails app" @@ -132,6 +117,17 @@ rake assets:precompile +echo "setup the secret file" +SECRET_A=`rake secret` +SECRET_B=`rake secret` +SECRET_C=`rake secret` +echo "development:" > config/secrets.yml +echo " secret_key_base: '$SECRET_A'" >> config/secrets.yml +echo "test:" >> config/secrets.yml +echo " secret_key_base: '$SECRET_B'" >> config/secrets.yml +echo "production:" >> config/secrets.yml +echo " secret_key_base: '$SECRET_C'" >> config/secrets.yml + echo "Intalling web interface complete..." echo echo "Fetching grader" @@ -140,7 +136,7 @@ mkdir judge cd judge -git clone -q git://github.com/jittat/cafe-grader-judge-scripts.git scripts +git clone -q git://github.com/cafe-grader-team/cafe-grader-judge-scripts.git scripts mkdir raw mkdir ev-exam mkdir ev