#!/bin/bash # Stop if any command fails set -e # Define version and paths VERSION=2.9.3 # Or make this an ARG in Dockerfile if you want to change it easily MZN_DIR=/opt/minizinc # This path is used in the Dockerfile ENV mkdir -p $MZN_DIR echo "Downloading MiniZinc ${VERSION}..." wget -q https://github.com/MiniZinc/MiniZincIDE/releases/download/${VERSION}/MiniZincIDE-${VERSION}-bundle-linux-x86_64.tgz -O MiniZincIDE.tgz echo "Extracting MiniZinc to ${MZN_DIR}..." tar -xzf MiniZincIDE.tgz -C $MZN_DIR --strip-components=1 echo "Cleaning up downloaded archive..." rm MiniZincIDE.tgz # Ensure binaries are executable (good practice) chmod -R +x ${MZN_DIR}/bin || true # Allow to fail if no bin dir yet, though it should exist. chmod -R +x ${MZN_DIR}/share/minizinc/solvers || true # Some solvers might be scripts echo "✅ setup.sh finished installing MiniZinc to ${MZN_DIR}"