Skip to content

Commit 012c5c6

Browse files
committed
With USER_PLUGINS_DIR we may install plugins in our home directory
1 parent b47065c commit 012c5c6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/src/com/biglybt/platform/unix/startupScript

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
AUTOUPDATE_SCRIPT=1 # change to 0 if you don't want your changes overwritten on next SCRIPT_VERSION change
55
JAVA_PROGRAM_DIR="" # use full path to java bin dir, ex. "/usr/java/j2sdk1.4.2/bin/"
66
#PROGRAM_DIR="/home/username/apps/biglybt" # use full path to BiglyBT bin dir
7+
#USER_PLUGINS_DIR="$HOME/.biglybt"
78
JAVA_PROPS=""
89

910
#######################################
@@ -103,7 +104,7 @@ runJavaOutput()
103104
RESULT=`$JAVABIN \
104105
-cp "${CLASSPATH}" \
105106
"-Djava.library.path=${PROGRAM_DIR}" \
106-
"-Dazureus.install.path=${PROGRAM_DIR}" \
107+
"-Dazureus.install.path=${USER_PLUGINS_DIR}" \
107108
"-Dazureus.script=$0" \
108109
"-Dawt.useSystemAAFontSettings=gasp" \
109110
${JAVA_PROPS} \
@@ -190,6 +191,11 @@ elif [ ! -f "${PROGRAM_DIR}/BiglyBT.jar" ]; then
190191
exit 1
191192
fi
192193

194+
# by default USER_PLUGINS_DIR is equal to PROGRAM DIR
195+
if [ -z "$USER_PLUGINS_DIR" ]; then
196+
USER_PLUGINS_DIR=${PROGRAM_DIR}
197+
fi
198+
193199
OLDPATH=$PWD
194200

195201
# Change path here so we can do for loop on program dirs with spaces
@@ -229,7 +235,7 @@ echo "$MSG_LOADING"
229235
$JAVABIN -Xmx256m \
230236
-cp "${CLASSPATH}" \
231237
"-Djava.library.path=${PROGRAM_DIR}" \
232-
"-Dazureus.install.path=${PROGRAM_DIR}" \
238+
"-Dazureus.install.path=${USER_PLUGINS_DIR}" \
233239
"-Dazureus.script=$0" \
234240
${JAVA_PROPS} \
235241
${JAVA_ARGS} \

0 commit comments

Comments
 (0)