File: register_plugin.sh

package info (click to toggle)
watcher-dashboard 14.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 900 kB
  • sloc: python: 3,035; sh: 568; javascript: 50; makefile: 34
file content (22 lines) | stat: -rwxr-xr-x 795 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

src_path=`cd "$1"; pwd`
dest_path=`cd "$2"; pwd`
# echo "$src_path --> $dest_path"

for filepath in $src_path/watcher_dashboard/local/enabled/*.py; do
    filename=$(basename $filepath)
    if [ $filename != "__init__.py" ]; then
        echo $filepath
        src_filepath="`cd "$(dirname $filepath)"; pwd`/$filename"
        dest_filepath="$dest_path/openstack_dashboard/local/enabled/$filename"
        echo "$src_filepath --> $dest_filepath"
        ln -s $src_filepath $dest_filepath
    fi
done

policy_file_name='watcher_policy.json'
src_policy_filepath=$src_path'/watcher_dashboard/conf/'$policy_file_name
dest_policy_file=$dest_path'/openstack_dashboard/conf/'$policy_file_name
echo "$src_policy_filepath --> $dest_policy_file"
ln -s $src_policy_filepath $dest_policy_file