#! /bin/bash # @todo convert to ansible panic(){ echo $@; exit 1; } [[ "root" != $(whoami) ]] && panic "must run as root" USER=$(getent passwd 1000 | cut -d ":" -f 1 ) [[ -z "$USER" ]] && panic "No user 1000" USERHOME=$(getent passwd 1000 | cut -d ":" -f 6) USEROPENSCAD="$USERHOME//.local/share/OpenSCAD/libraries" # add user 1000 to dialout adduser $USER dialout mkdir -p $USERHOME/bin && chown $USER:$USER $USERHOME/bin mkdir -p $USEROPENSCAD && chown -R $USER:$USER $USERHOME/.local/share/OpenSCAD declare -a PACKAGES # Openscad PACKAGES+=(openscad) # Printrun # Note: Bullseye and later seem to split this package in # plater # printcore # printrun # pronsole # pronterface PACKAGES+=(printrun) # Slic3r PACKAGES+=(slic3r) PACKAGES+=(slic3r-prusa) # Cura PACKAGES+=(cura-engine) # Repsnapper PACKAGES+=(repsnapper) # Freecad PACKAGES+=(freecad) # Inkscape PACKAGES+=(inkscape) # blender PACKAGES+=(blender) # fuse for AppImage PACKAGES+=(fuse) apt-get update apt-get install -y --no-install-recommends ${PACKAGES[@]} # Install OPENSCAD library BOLTSPART wget https://github.com/boltsparts/boltsfc/archive/refs/tags/0.4.1.tar.gz -O /tmp/boltspart.tgz cd /tmp && tar -xzf /tmp/boltspart.tgz mv /tmp/boltsfc-0.4.1/* $USEROPENSCAD # Install lightburn wget https://github.com/LightBurnSoftware/deployment/releases/download/1.3.01/LightBurn-Linux64-v1.3.01.run -O /tmp/lightburn.install.sh bash /tmp/lightburn.install.sh # Add arduino IDE wget https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-latest_Linux_64bit.AppImage -O $USERHOME/bin/arduino.AppImage chmod +x $USERHOME/bin/arduino.AppImage