diff --git a/script/noosfero-plugins b/script/noosfero-plugins index 4830c1a..6e44a41 100755 --- a/script/noosfero-plugins +++ b/script/noosfero-plugins @@ -97,6 +97,11 @@ _enable(){ else dependencies_ok=true dependencies_file="$source/dependencies.rb" + if [ -e $source/Gemfile ]; then + if ! (cd $source && bundle --local); then + dependencies_ok=false + fi + fi if ! run $dependencies_file; then dependencies_ok=false fi diff --git a/script/quick-start b/script/quick-start index 282f3a7..6831ebf 100755 --- a/script/quick-start +++ b/script/quick-start @@ -90,9 +90,12 @@ else # create the database with sample data say 'Configuring Noosfero to use PostgreSQL, with your user.' run cp config/database.yml.pgsql config/database.yml + if [ -z "$USER" ]; then + USER=$(stat -c %U $0) + fi sed -ri "s/username: noosfero/username: $USER/" config/database.yml - sudo su - postgres -c "createuser $USER --no-superuser --createdb --no-createrole" - sudo su - postgres -c "createdb noosfero_development -O $USER" + sudo su - postgres -c "createuser $USER --no-superuser --createdb --no-createrole" || true + sudo su - postgres -c "createdb noosfero_development -O $USER" || true run rake db:schema:load run rake db:data:minimal -- libgit2 0.21.2