Update install.sh

This commit is contained in:
colin 2024-12-12 10:48:57 -05:00
parent d13a679438
commit 6284d584de
1 changed files with 29 additions and 18 deletions

View File

@ -14,30 +14,41 @@ fi
cd ~/Documents/OpenSCAD/libraries/ cd ~/Documents/OpenSCAD/libraries/
if ! [ -d "BOSL2" ]; then declare -A libraries=(
git clone https://github.com/BelfrySCAD/BOSL2.git ["BOSL2"]="https://github.com/BelfrySCAD/BOSL2.git"
else ["BOSL"]="https://github.com/revarbat/BOSL.git"
cd BOSL2 ["MCAD"]="https://github.com/openscad/MCAD.git"
git pull ["BOLTS"]="https://github.com/boltsparts/BOLTS.git"
cd .. ["nutsnbolts"]="https://github.com/JohK/nutsnbolts.git"
fi ["openscad-fillets"]="https://github.com/jfhbrook/openscad-fillets.git"
["openscad-model-library"]="https://github.com/cznewt/openscad-model-library.git"
["OpenSCAD-Arduino-Mounting-Library"]="https://github.com/kellyegan/OpenSCAD-Arduino-Mounting-Library.git"
["BezierScad"]="https://github.com/chadkirby/BezierScad.git"
["OpenSCAD-Track"]="https://github.com/joostn/OpenSCAD-Track.git"
["Chamfers-for-OpenSCAD"]="https://github.com/SebiTimeWaster/Chamfers-for-OpenSCAD.git"
["openjscad-u-joints"]="https://github.com/celer/openjscad-u-joints.git"
)
if ! [ -d "BOSL" ]; then for lib in "${!libraries[@]}"; do
git clone https://github.com/revarbat/BOSL.git if ! [ -d "$lib" ]; then
git clone "${libraries[$lib]}"
else else
cd BOSL cd "$lib"
git pull git pull
cd .. cd ..
fi fi
done
if ! command -v openscad >/dev/null 2>&1; then if ! command -v openscad >/dev/null 2>&1; then
echo "OpenSCAD installation failed. Please verify your Homebrew setup." echo "OpenSCAD installation failed. Please verify your Homebrew setup."
exit 1 exit 1
fi fi
if [ ! -d ~/Documents/OpenSCAD/libraries/BOSL2 ] || [ ! -d ~/Documents/OpenSCAD/libraries/BOSL ]; then for lib in "${!libraries[@]}"; do
echo "Library setup failed. Verify git and directory permissions." if [ ! -d "$lib" ]; then
echo "Library $lib setup failed. Verify git and directory permissions."
exit 1 exit 1
fi fi
done
echo "OpenSCAD and libraries successfully installed and configured." echo "OpenSCAD and libraries successfully installed and configured."