cd $HOME/dc
unset speedrecpath
-for dir in /usr/libexec /usr/local/libexec; do
+IFS=: binpath=($PATH)
+lepath=()
+for dir in "${binpath[@]}"; do
+ lepath=("${lepath[@]}" "${dir%/bin}/libexec")
+done
+for dir in "${lepath[@]}" /usr/libexec /usr/local/libexec; do
if [ -x "${dir}/speedrec" ]; then
speedrecpath="${dir}/speedrec"
fi
fi
mv "$resfile" "$newname"
if [ -x $HOME/dc/complete ]; then
- export "${!dcarg_@}" tth
+ export "${!dcarg_@}" tth filesize
exec $HOME/dc/complete "$newname"
fi
exit 0