diff --git a/deluge/plugins/FreeSpace/create_dev_link.sh b/deluge/plugins/FreeSpace/create_dev_link.sh index be73dcaeb..5e04057c3 100755 --- a/deluge/plugins/FreeSpace/create_dev_link.sh +++ b/deluge/plugins/FreeSpace/create_dev_link.sh @@ -1,7 +1,11 @@ #!/bin/bash -cd /home/vampas/projects/DelugeNotify/deluge/plugins/freespace -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/FreeSpace.egg-link .config/plugins -rm -fr ./temp +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp diff --git a/deluge/plugins/notifications/create_dev_link.sh b/deluge/plugins/notifications/create_dev_link.sh index fddef345f..5e04057c3 100755 --- a/deluge/plugins/notifications/create_dev_link.sh +++ b/deluge/plugins/notifications/create_dev_link.sh @@ -1,7 +1,11 @@ #!/bin/bash -cd /home/vampas/projects/DelugeNotify/deluge/plugins/notifications -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/Notifications.egg-link .config//plugins -rm -fr ./temp +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp diff --git a/deluge/plugins/stats/create_dev_link.sh b/deluge/plugins/stats/create_dev_link.sh index 35e5c2a5c..5e04057c3 100755 --- a/deluge/plugins/stats/create_dev_link.sh +++ b/deluge/plugins/stats/create_dev_link.sh @@ -1,6 +1,11 @@ #!/bin/bash -mkdir temp -export PYTHONPATH=./temp -python setup.py develop --install-dir ./temp -cp ./temp/Stats.egg-link ~/.config/deluge/plugins -rm -fr ./temp +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp diff --git a/deluge/plugins/webui/create_dev_link.sh b/deluge/plugins/webui/create_dev_link.sh index 6d3af263f..f4d60d2ae 100755 --- a/deluge/plugins/webui/create_dev_link.sh +++ b/deluge/plugins/webui/create_dev_link.sh @@ -1,7 +1,11 @@ #!/bin/bash -cd /home/damien/Projects/deluge/deluge/plugins/webui -mkdir temp -export PYTHONPATH=./temp -python setup.py build develop --install-dir ./temp -cp ./temp/WebUi.egg-link /home/damien/.config/deluge/plugins -rm -fr ./temp +BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "/home/damien/.config/deluge/" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir "$CONFIG_DIR" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 +cd $BASEDIR +test -d $BASEDIR/temp || mkdir $BASEDIR/temp +export PYTHONPATH=$BASEDIR/temp +python setup.py build develop --install-dir $BASEDIR/temp +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins +rm -fr $BASEDIR/temp diff --git a/deluge/scripts/create_plugin.py b/deluge/scripts/create_plugin.py index 0087c33fd..7c6006f93 100644 --- a/deluge/scripts/create_plugin.py +++ b/deluge/scripts/create_plugin.py @@ -398,11 +398,14 @@ pkg_resources.declare_namespace(__name__) CREATE_DEV_LINK = """#!/bin/bash BASEDIR=$(cd `dirname $0` && pwd) +CONFIG_DIR=$( test -z $1 && echo "%(configdir)s" || echo "$1") +[ -d "$CONFIG_DIR/plugins" ] || echo "Config dir \"$CONFIG_DIR\" is either not a directory or is not a proper deluge config directory. Exiting" +[ -d "$CONFIG_DIR/plugins" ] || exit 1 cd $BASEDIR test -d $BASEDIR/temp || mkdir $BASEDIR/temp export PYTHONPATH=$BASEDIR/temp python setup.py build develop --install-dir $BASEDIR/temp -cp $BASEDIR/temp/*.egg-link %(configdir)s/plugins +cp $BASEDIR/temp/*.egg-link $CONFIG_DIR/plugins rm -fr $BASEDIR/temp """