#! /bin/sh -e

update-alternatives \
    --install /usr/bin/cc cc /usr/bin/gcc 20 \
    --slave /usr/share/man/man1/cc.1.gz cc.1.gz /usr/share/man/man1/gcc.1.gz

if [ "`dpkg --print-installation-architecture`" = sparc ]; then
    # Remove the old incorrect alternative
    update-alternatives --remove sparc64-linux-gcc /usr/bin/gcc || true
    update-alternatives --remove sparc64-linux-gcc /usr/bin/sparc64-linux-gcc-wrapper || true
fi

# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
	if [ -d /usr/doc -a ! -e /usr/doc/gcc -a -d /usr/share/doc/gcc ]; then
		ln -sf ../share/doc/gcc /usr/doc/gcc
	fi
fi
# End automatically added section
# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
	if [ -d /usr/doc -a ! -e /usr/doc/gcc -a -d /usr/share/doc/gcc ]; then
		ln -sf ../share/doc/gcc /usr/doc/gcc
	fi
fi
# End automatically added section

