File size: 884 Bytes
e67d561 34e8992 e67d561 34e8992 e67d561 34e8992 f021e7d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
#!/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}" |