代码拉取完成,页面将自动刷新
#!/bin/bash
function InstallOmc() {
apt-get update
apt-get upgrade
apt-get install -qy gnupg wget ca-certificates apt-transport-https default-libmysqlclient-dev
echo "deb https://build.openmodelica.org/omc/builds/linux/releases/1.16.2/ $(cat /etc/lsb-release | grep CODENAME | cut -d= -f2) release" >/etc/apt/sources.list.d/openmodelica.list
wget https://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add -
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install --no-install-recommends -qy omc
}
function InstallPython() {
apt-get install -qy python3-pip
pip3 install --no-cache-dir ompython
pip3 install -r ./requirement.txt
}
function InstallModelicaLib() {
mkdir file
cp -rf ./libraries/* ~/.openmodelica/libraries
cd /home/${USER}
chown -R ${USER} .openmodelica/
chmod 777 .openmodelica/libraries
cd .openmodelica/libraries
}
echo "install openmodelica"
InstallOmc
echo "install openmodelica python"
InstallPython
echo "install openmodelica Modelica lib"
InstallModelicaLib
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。