Last active
October 10, 2023 21:44
-
-
Save kirasglimmer/50164ed8d5534767a1dd47c8f85e79f8 to your computer and use it in GitHub Desktop.
Install the M3D GUI application for Linux. Supports M3D Pro and M3D Micro+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# install mono key | |
if [ ! -f /etc/apt/sources.list.d/mono-official.list ]; then | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list | |
fi | |
# install mono | |
if [ ! `sudo dpkg -l | grep -c mono-devel` ]; then | |
sudo apt update | |
sudo apt install -y mono-devel | |
fi | |
# install the package if not already installed | |
if [ ! `sudo dpkg -l | grep -c m3drealize` ]; then | |
# download the installer | |
if [ ! -f /tmp/m3drealize_1.8.2-1_amd64.deb ]; then | |
echo "Downloading installer" | |
curl -L http://printm3d.com/files/software_pro_alpha/Linux/m3drealize_1.8.2-1_amd64.deb > /tmp/m3drealize_1.8.2-1_amd64.deb | |
fi | |
echo "installing m3d realize" | |
sudo dpkg -i /tmp/m3drealize_1.8.2-1_amd64.deb | |
fi | |
# Setup desktop shortcut | |
shortcut="$HOME/Desktop/M3D Realize.desktop" | |
if [ ! -f "$shortcut" ]; then | |
cat >"$shortcut" <<EOF | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Name=M3D Realize | |
GenericName=M3D Realize | |
Comment=M3D Realize | |
Exec=/opt/m3drealize/M3DGUI | |
Icon=/opt/m3drealize/Data/GUIImages/M3D32x32Icon.ICO | |
Terminal=false | |
Categories=System; | |
StartupNotify=true | |
EOF | |
chmod u+x "$shortcut" | |
fi | |
sudo usermod -aG dialout $USER | |
echo "You may need to logout and login again before M3DRealize will load." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment