Commit b2cc9def801529461451fbbfdaefe0011cc8e942

Authored by Rodrigo Souto
1 parent 7b118e80

plugins-script: test if there is a features folder before trying to cd it

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
script/noosfero-plugins
@@ -104,8 +104,10 @@ _enable(){ @@ -104,8 +104,10 @@ _enable(){
104 plugins_features_dir="$NOOSFERO_DIR/features/plugins" 104 plugins_features_dir="$NOOSFERO_DIR/features/plugins"
105 cd $plugins_public_dir 105 cd $plugins_public_dir
106 test -d "$source/public" && ln -s "$source/public" "$plugin" 106 test -d "$source/public" && ln -s "$source/public" "$plugin"
107 - cd $plugins_features_dir  
108 - test -d "$NOOSFERO_DIR/features" && test -d "$source/features" && ln -s "$source/features" "$plugin" 107 + if [ -d "$NOOSFERO_DIR/features" ]; then
  108 + cd $plugins_features_dir
  109 + test -d "$source/features" && ln -s "$source/features" "$plugin"
  110 + fi
109 _say "$plugin enabled" 111 _say "$plugin enabled"
110 run "$source/after_enable.rb" 112 run "$source/after_enable.rb"
111 needs_migrate=true 113 needs_migrate=true