From 03605ab686f1e567a0c9ac5868f701039ffc6123 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 19 Jun 2013 09:01:20 -0400 Subject: [PATCH 1/3] Don't print error messages if log/db/data directories already exist --- scripts/create-dev-env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/create-dev-env.sh b/scripts/create-dev-env.sh index ede86b123a..1f3e078107 100755 --- a/scripts/create-dev-env.sh +++ b/scripts/create-dev-env.sh @@ -495,9 +495,9 @@ pip install argcomplete cd $BASE/edx-platform bundle install -mkdir "$BASE/log" || true -mkdir "$BASE/db" || true -mkdir "$BASE/data" || true +mkdir -p "$BASE/log" +mkdir -p "$BASE/db" +mkdir -p "$BASE/data" rake django-admin[syncdb] rake django-admin[migrate] From 2de645599a1a173a8d247c92d79b7e0c9738f31f Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 19 Jun 2013 09:01:30 -0400 Subject: [PATCH 2/3] Remove trailing whitespace --- scripts/create-dev-env.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/create-dev-env.sh b/scripts/create-dev-env.sh index 1f3e078107..cc0efbef0d 100755 --- a/scripts/create-dev-env.sh +++ b/scripts/create-dev-env.sh @@ -73,7 +73,7 @@ change_git_push_defaults() { #Set git push defaults to upstream rather than master output "Changing git defaults" git config --global push.default upstream - + } clone_repos() { @@ -206,10 +206,10 @@ case `uname -s` in distro=`lsb_release -cs` case $distro in - wheezy|jessie|maya|olivia|nadia|precise|quantal) + wheezy|jessie|maya|olivia|nadia|precise|quantal) warning " Debian support is not fully debugged. Assuming you have standard - development packages already working like scipy rvm, the + development packages already working like scipy rvm, the installation should go fine, but this is still a work in progress. Please report issues you have and let us know if you are able to figure @@ -218,7 +218,7 @@ case `uname -s` in Press return to continue or control-C to abort" read dummy - sudo apt-get install git ;; + sudo apt-get install git ;; squeeze|lisa|katya|oneiric|natty|raring) warning " It seems like you're using $distro which has been deprecated. @@ -231,7 +231,7 @@ case `uname -s` in Press return to continue or control-C to abort" read dummy sudo apt-get install git - ;; + ;; *) error "Unsupported distribution - $distro" @@ -283,7 +283,7 @@ clone_repos if [[ -d $BASE/edx-platform/scripts ]]; then output "Installing system-level dependencies" bash $BASE/edx-platform/scripts/install-system-req.sh -else +else error "It appears that our directory structure has changed and somebody failed to update this script. raise an issue on Github and someone should fix it." exit 1 @@ -314,14 +314,14 @@ case `uname -s` in [Ll]inux) warning "Setting up rvm on linux. This is a known pain point. If the script fails here - refer to the following stack overflow question: + refer to the following stack overflow question: http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395" sudo apt-get --purge remove ruby-rvm sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh curl -sL https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles ;; esac - + # Ensure we have RVM available as a shell function so that it can mess # with the environment and set everything up properly. The RVM install From fc6043876a7652a7fde90a1985cc2d5a71e5f383 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 19 Jun 2013 09:01:52 -0400 Subject: [PATCH 3/3] Install python and node prerequisites before trying to run django-admin --- scripts/create-dev-env.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create-dev-env.sh b/scripts/create-dev-env.sh index cc0efbef0d..d3b7715904 100755 --- a/scripts/create-dev-env.sh +++ b/scripts/create-dev-env.sh @@ -494,6 +494,7 @@ cd $BASE pip install argcomplete cd $BASE/edx-platform bundle install +rake install_prereqs mkdir -p "$BASE/log" mkdir -p "$BASE/db"