#!/bin/sh set -e if [ "$1" = configure ]; then if [ -d /usr/share/dotnet/mono/ ] && [ -L /usr/share/dotnet/mono ]; then # it's a symlink rm /usr/share/dotnet/mono fi MONOARCH=$(mono --version | grep Architecture | sed 's/.*: //' | sed 's/el,.*//') mkdir -p /usr/lib/mono/aot-cache/${MONOARCH}/ mono \ --aot=outfile=/usr/lib/mono/aot-cache/${MONOARCH}/mscorlib.dll.so \ -O=all /usr/lib/mono/4.5/mscorlib.dll > /dev/null 2>&1 || true fi # Update the alternatives update-alternatives \ --install /usr/bin/cli cli /usr/bin/mono 10 \ --slave /usr/share/man/man1/cli.1.gz cli.1.gz /usr/share/man/man1/mono.1.gz update-alternatives \ --install /usr/bin/cli-gacutil global-assembly-cache-tool /usr/bin/gacutil 10 \ --slave /usr/share/man/man1/cli-gacutil.1.gz cli-gacutil.1.gz /usr/share/man/man1/gacutil.1.gz # Drop binfmt integration, if it has been enabled by a prior version of Mono. # This command does not fail if integration was not already setup. if command -v update-binfmts >/dev/null; then update-binfmts --package mono-runtime --remove cli /usr/bin/cli 2>/dev/null fi