From abca7f3085c9a9e8dbf72aa8f04164b06dfc939a Mon Sep 17 00:00:00 2001 From: alban Date: Thu, 5 Jan 2023 21:08:41 +0100 Subject: [PATCH] enh: new installs --- install.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/install.sh b/install.sh index df78f10..7723a69 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,20 @@ #! /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 $USER:$USER $USEROPENSCAD + declare -a PACKAGES # Openscad @@ -36,3 +51,19 @@ PACKAGES+=(blender) 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 + + +