Commit b326d84e0f09438c041b8a97548bc2b626c7ef81
1 parent
067cd84b
Exists in
master
and in
21 other branches
script/plugin: use absolute links to plugins
When config/noosfero is a symlink to /etc/noosfero/plugins (or to any other location, really), relative symlinks do not work.
Showing
1 changed file
with
1 additions
and
3 deletions
Show diff stats
script/noosfero-plugins
| @@ -82,7 +82,6 @@ _enable(){ | @@ -82,7 +82,6 @@ _enable(){ | ||
| 82 | 82 | ||
| 83 | if [ -d "$available_plugins_dir/$plugin" ]; then | 83 | if [ -d "$available_plugins_dir/$plugin" ]; then |
| 84 | source="$available_plugins_dir/$plugin" | 84 | source="$available_plugins_dir/$plugin" |
| 85 | - linksource="../../plugins/$plugin" | ||
| 86 | else | 85 | else |
| 87 | if [ ! -d "$plugin" ]; then | 86 | if [ ! -d "$plugin" ]; then |
| 88 | echo "E: $plugin not found (needs to be an existing directory)" | 87 | echo "E: $plugin not found (needs to be an existing directory)" |
| @@ -91,7 +90,6 @@ _enable(){ | @@ -91,7 +90,6 @@ _enable(){ | ||
| 91 | 90 | ||
| 92 | # out-of-tree plugins | 91 | # out-of-tree plugins |
| 93 | source="$plugin" | 92 | source="$plugin" |
| 94 | - linksource="$source" | ||
| 95 | plugin=$(basename "$plugin") | 93 | plugin=$(basename "$plugin") |
| 96 | fi | 94 | fi |
| 97 | 95 | ||
| @@ -125,7 +123,7 @@ _enable(){ | @@ -125,7 +123,7 @@ _enable(){ | ||
| 125 | fi | 123 | fi |
| 126 | fi | 124 | fi |
| 127 | if [ "$installation_ok" = true ] && [ "$dependencies_ok" = true ]; then | 125 | if [ "$installation_ok" = true ] && [ "$dependencies_ok" = true ]; then |
| 128 | - ln -s "$linksource" "$target" | 126 | + ln -s "$source" "$target" |
| 129 | plugins_public_dir="$NOOSFERO_DIR/public/plugins" | 127 | plugins_public_dir="$NOOSFERO_DIR/public/plugins" |
| 130 | plugins_features_dir="$NOOSFERO_DIR/features/plugins" | 128 | plugins_features_dir="$NOOSFERO_DIR/features/plugins" |
| 131 | test -d "$target/public" && ln -s "$target/public" "$plugins_public_dir/$plugin" | 129 | test -d "$target/public" && ln -s "$target/public" "$plugins_public_dir/$plugin" |