Skip to content

Commit 7b64508

Browse files
committed
We need a USER_PLUGINS_DIR
so that BiglyBT can be installed in the PROGRAM_DIR without write permission for the user, and the user can store their own plugins in their USER_PLUGINS_DIR.
1 parent 0c1a433 commit 7b64508

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
#######################################
@@ -107,7 +108,7 @@ runJavaOutput()
107108
RESULT=`$JAVABIN \
108109
-cp "${CLASSPATH}" \
109110
"-Djava.library.path=${PROGRAM_DIR}" \
110-
"-Dazureus.install.path=${PROGRAM_DIR}" \
111+
"-Dazureus.install.path=${USER_PLUGINS_DIR}" \
111112
"-Dazureus.script=$0" \
112113
"-Dawt.useSystemAAFontSettings=gasp" \
113114
${JAVA_PROPS} \
@@ -194,6 +195,11 @@ elif [ ! -f "${PROGRAM_DIR}/BiglyBT.jar" ]; then
194195
exit 1
195196
fi
196197

198+
# by default USER_PLUGINS_DIR is equal to PROGRAM DIR
199+
if [ -z "$USER_PLUGINS_DIR" ]; then
200+
USER_PLUGINS_DIR=${PROGRAM_DIR}
201+
fi
202+
197203
OLDPATH=$PWD
198204

199205
# Change path here so we can do for loop on program dirs with spaces
@@ -233,7 +239,7 @@ echo "$MSG_LOADING"
233239
$JAVABIN -Xmx256m \
234240
-cp "${CLASSPATH}" \
235241
"-Djava.library.path=${PROGRAM_DIR}" \
236-
"-Dazureus.install.path=${PROGRAM_DIR}" \
242+
"-Dazureus.install.path=${USER_PLUGINS_DIR}" \
237243
"-Dazureus.script=$0" \
238244
${JAVA_PROPS} \
239245
${JAVA_ARGS} \

0 commit comments

Comments
 (0)