我正在尝试编译Matlab函数并在Docker容器中运行它们。当我在我的计算机上运行.sh文件时,它可以正常工作,但是当我将该文件放在一个容器中并从那里运行时,它会给出“未终止的引号字符串”错误。我的sh文件怎么了?我用mac来编译我的函数,但我在容器中使用linux。你认为这就是问题所在吗?
#!/bin/sh
# script for execution of deployed applications
#
# Sets up the MATLAB Runtime environment for the current $ARCH and executes
# the specified command.
#
exe_name=$0
exe_dir=`dirname "$0"`
echo "------------------------------------------"
if [ "x$1" = "x" ]; then
echo Usage:
echo $0 \<deployedMCRroot\> args
else
echo Setting up environment variables
MCRROOT="$1"
echo ---
DYLD_LIBRARY_PATH=.:${MCRROOT}/runtime/maci64 ;
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${MCRROOT}/bin/maci64 ;
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${MCRROOT}/sys/os/maci64;
export DYLD_LIBRARY_PATH;
echo DYLD_LIBRARY_PATH is ${DYLD_LIBRARY_PATH};
shift 1
args=
while [ $# -gt 0 ]; do
token=$1
args="${args} \"${token}\""
shift
done
eval "\"${exe_dir}/helloworld_times.app/Contents/MacOS/helloworld_times\"" $args
fi
exit