Commit b326d84e0f09438c041b8a97548bc2b626c7ef81

Authored by Antonio Terceiro
1 parent 067cd84b

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 82  
83 83 if [ -d "$available_plugins_dir/$plugin" ]; then
84 84 source="$available_plugins_dir/$plugin"
85   - linksource="../../plugins/$plugin"
86 85 else
87 86 if [ ! -d "$plugin" ]; then
88 87 echo "E: $plugin not found (needs to be an existing directory)"
... ... @@ -91,7 +90,6 @@ _enable(){
91 90  
92 91 # out-of-tree plugins
93 92 source="$plugin"
94   - linksource="$source"
95 93 plugin=$(basename "$plugin")
96 94 fi
97 95  
... ... @@ -125,7 +123,7 @@ _enable(){
125 123 fi
126 124 fi
127 125 if [ "$installation_ok" = true ] && [ "$dependencies_ok" = true ]; then
128   - ln -s "$linksource" "$target"
  126 + ln -s "$source" "$target"
129 127 plugins_public_dir="$NOOSFERO_DIR/public/plugins"
130 128 plugins_features_dir="$NOOSFERO_DIR/features/plugins"
131 129 test -d "$target/public" && ln -s "$target/public" "$plugins_public_dir/$plugin"
... ...