Files
openproject/modules/bim/bin/setup_dev.sh
T
Christophe Bliard 46e230b586 Retry downloads of bim dependencies in docker
Download failed in some CI builds for some reason [1], while it worked
for previous builds [2]. I would assume it's transient download errors.

Adding `--tries 3` to the wget commands to retry the downloads should
fix the issue.

Also replaced `--quiet` with `--no-verbose` to be terser than default
but still get error information when it fails.

[1] https://github.com/opf/openproject-flavours/actions/runs/17911001201 and https://github.com/opf/openproject-flavours/actions/runs/17910946720/job/50922134721
[2] https://github.com/opf/openproject-flavours/actions/runs/17910953231/job/50922155467
2025-09-22 12:04:30 +02:00

54 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set -e
if ! which apt > /dev/null 2>&1; then
echo "Needs debian/ubuntu system :-("
exit 1;
fi
if [[ $EUID -ne 0 ]]; then
echo "Must be run as root user."
exit 1
fi
# Specifics for BIM edition (Ubuntu)
apt-get update -qq
apt-get install -y dotnet-runtime-6.0 wget unzip
tmpdir=$(mktemp -d)
cd $tmpdir
# Install COLLADA2GLTF
wget --quiet --tries 3 https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.5/COLLADA2GLTF-v2.1.5-linux.zip
unzip -q COLLADA2GLTF-v2.1.5-linux.zip
mv COLLADA2GLTF-bin "/usr/local/bin/COLLADA2GLTF"
# IFCconvert
wget --quiet --tries 3 https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.7.11-fea8e3a-linux64.zip
unzip -q IfcConvert-v0.7.11-fea8e3a-linux64.zip
mv IfcConvert "/usr/local/bin/IfcConvert"
wget --quiet --tries 3 https://github.com/bimspot/xeokit-metadata/releases/download/1.0.1/xeokit-metadata-linux-x64.tar.gz
tar -zxvf xeokit-metadata-linux-x64.tar.gz
chmod +x xeokit-metadata-linux-x64/xeokit-metadata
cp -rT xeokit-metadata-linux-x64 "/usr/lib/xeokit-metadata"
rm -f /usr/local/bin/xeokit-metadata
ln -s /usr/lib/xeokit-metadata/xeokit-metadata /usr/local/bin/xeokit-metadata
cd /
rm -rf $tmpdir
which IfcConvert
echo "✔ IfcConvert is in your path."
which COLLADA2GLTF
echo "✔ COLLADA2GLTF is in your path."
which xeokit-metadata
echo "✔ xeokit-metadata is in your path."
echo "DONE - Now execute the following as your development user:
$ # Install XKT converter
$ npm install @xeokit/xeokit-gltf-to-xkt@1.3.1 -g"