#!/bin/sh

ranlibLibrary() {
	if [ -f $1 ]; then
		ranlib $1
	fi
}

if [ ! -r /usr/bin/ar ]; then
   ln -sf /mnt/usr/bin/ar /usr/bin/ar
fi
if [ $1 = "-install" ]; then
	ranlibLibrary usr/lib/libOI.a
	ranlibLibrary usr/lib/libOIrg.sa
	ranlibLibrary usr/lib/libOI.sa
fi
( cd usr/include ; ln -s unistd.h sysent.h )
( cd lib ; ln -sf  /usr/lib/libOI.so.4.0 libOI.so.4 )
( cd lib ; ln -sf  /usr/lib/libOIrg.so.4.0 libOIrg.so.4 )
