Update install.sh
This commit is contained in:
parent
d13a679438
commit
6284d584de
41
install.sh
41
install.sh
|
@ -14,30 +14,41 @@ fi
|
|||
|
||||
cd ~/Documents/OpenSCAD/libraries/
|
||||
|
||||
if ! [ -d "BOSL2" ]; then
|
||||
git clone https://github.com/BelfrySCAD/BOSL2.git
|
||||
else
|
||||
cd BOSL2
|
||||
git pull
|
||||
cd ..
|
||||
fi
|
||||
declare -A libraries=(
|
||||
["BOSL2"]="https://github.com/BelfrySCAD/BOSL2.git"
|
||||
["BOSL"]="https://github.com/revarbat/BOSL.git"
|
||||
["MCAD"]="https://github.com/openscad/MCAD.git"
|
||||
["BOLTS"]="https://github.com/boltsparts/BOLTS.git"
|
||||
["nutsnbolts"]="https://github.com/JohK/nutsnbolts.git"
|
||||
["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
|
||||
git clone https://github.com/revarbat/BOSL.git
|
||||
else
|
||||
cd BOSL
|
||||
for lib in "${!libraries[@]}"; do
|
||||
if ! [ -d "$lib" ]; then
|
||||
git clone "${libraries[$lib]}"
|
||||
else
|
||||
cd "$lib"
|
||||
git pull
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if ! command -v openscad >/dev/null 2>&1; then
|
||||
echo "OpenSCAD installation failed. Please verify your Homebrew setup."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d ~/Documents/OpenSCAD/libraries/BOSL2 ] || [ ! -d ~/Documents/OpenSCAD/libraries/BOSL ]; then
|
||||
echo "Library setup failed. Verify git and directory permissions."
|
||||
for lib in "${!libraries[@]}"; do
|
||||
if [ ! -d "$lib" ]; then
|
||||
echo "Library $lib setup failed. Verify git and directory permissions."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo "OpenSCAD and libraries successfully installed and configured."
|
Loading…
Reference in New Issue