Commit 24c76fe1d504926c870d295aa8fab3ce1d192242
1 parent
f848b280
Exists in
master
and in
29 other branches
Adding install.rb file for plugins
(ActionItem2776)
Showing
5 changed files
with
18 additions
and
6 deletions
Show diff stats
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +raise "Not ready yet" |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +raise "Not ready yet" |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +raise "Not ready yet" |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +raise "Not ready yet" |
script/noosfero-plugins
@@ -86,12 +86,18 @@ _enable(){ | @@ -86,12 +86,18 @@ _enable(){ | ||
86 | echo "E: $plugin plugin does not exist!" | 86 | echo "E: $plugin plugin does not exist!" |
87 | return | 87 | return |
88 | fi | 88 | fi |
89 | - dependencies_ok=true | ||
90 | - dependencies_file="$source/dependencies.rb" | ||
91 | - if ! run $dependencies_file; then | ||
92 | - dependencies_ok=false | 89 | + installation_ok=true |
90 | + installation_file="$source/install.rb" | ||
91 | + if ! run $installation_file; then | ||
92 | + installation_ok=false | ||
93 | + else | ||
94 | + dependencies_ok=true | ||
95 | + dependencies_file="$source/dependencies.rb" | ||
96 | + if ! run $dependencies_file; then | ||
97 | + dependencies_ok=false | ||
98 | + fi | ||
93 | fi | 99 | fi |
94 | - if [ "$dependencies_ok" = true ]; then | 100 | + if [ "$installation_ok" = true ] && [ "$dependencies_ok" = true ]; then |
95 | ln -s "$source" "$target" | 101 | ln -s "$source" "$target" |
96 | plugins_public_dir="$NOOSFERO_DIR/public/plugins" | 102 | plugins_public_dir="$NOOSFERO_DIR/public/plugins" |
97 | plugins_features_dir="$NOOSFERO_DIR/features/plugins" | 103 | plugins_features_dir="$NOOSFERO_DIR/features/plugins" |
@@ -100,7 +106,9 @@ _enable(){ | @@ -100,7 +106,9 @@ _enable(){ | ||
100 | _say "$plugin enabled" | 106 | _say "$plugin enabled" |
101 | run "$source/after_enable.rb" | 107 | run "$source/after_enable.rb" |
102 | needs_migrate=true | 108 | needs_migrate=true |
103 | - else | 109 | + elif [ "$installation_ok" = false ]; then |
110 | + echo "W: failed to install $plugin; not enabling" | ||
111 | + elif [ "$dependencies_ok" = false ]; then | ||
104 | echo "W: failed to load dependencies for $plugin; not enabling" | 112 | echo "W: failed to load dependencies for $plugin; not enabling" |
105 | fi | 113 | fi |
106 | fi | 114 | fi |