You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entrypoint.sh
+24-15Lines changed: 24 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ mod_fix_kad_bootstrap() {
39
39
if [ !-f"${AMULE_HOME}/nodes.dat" ];then
40
40
printf"[MOD_FIX_KAD_BOOTSTRAP] Downloading nodes.dat from %s ... You can disable this mod with MOD_FIX_KAD_BOOTSTRAP_ENABLED=false\n""${KAD_NODES_DAT_URL}"
# Share all the directories (separated by semicolon ';') and subdirectories in aMule.
56
56
printf"[MOD_AUTO_SHARE] Sharing the following directories with sub-directories: %s ... You can disable this mod with MOD_AUTO_SHARE_ENABLED=false\n""$MOD_AUTO_SHARE_DIRECTORIES"
57
-
SHAREDDIR_CONF=${AMULE_HOME}/shareddir.dat
58
-
printf"/incoming\n">"$SHAREDDIR_CONF"
59
-
iter=""
60
-
IN="$MOD_AUTO_SHARE_DIRECTORIES"
61
-
while [ "$IN"!="$iter" ] ;do
62
-
iter=${IN%%;*}
63
-
IN="${IN#"$iter";}"
64
-
printf"[MOD_AUTO_SHARE] Sharing directory '%s' with sub-directories...\n""$iter"
65
-
find "$iter" -type d >>"$SHAREDDIR_CONF"
57
+
SHAREDDIR_CONF="${AMULE_HOME}/shareddir.dat"
58
+
SHAREDDIR_TMP="${SHAREDDIR_CONF}.tmp"
59
+
printf"%s\n""${AMULE_INCOMING}">"$SHAREDDIR_TMP"
60
+
IFS=';'
61
+
set -- "$MOD_AUTO_SHARE_DIRECTORIES"
62
+
forraw_dirin"$@";do
63
+
dir=$(printf '%s'"$raw_dir"| sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
64
+
[ -z"$dir" ] &&continue
65
+
if [ -d"$dir" ];then
66
+
printf"[MOD_AUTO_SHARE] Sharing directory '%s' with sub-directories...\n""$dir"
0 commit comments