#!/bin/sh

echo "Trying to find the libc.so.4 with the highest version number"
library=`ls /lib/libc.so.4.* | grep -v z | tail -1l`
echo $library
if [ X$library = X ] ; then
	echo "Trying to find the libc.so.4.z with the highest version numbet"
	library=`ls /lib/libc.so.4.* | tail -1l`
	if [ X$library = X -a -f /lib/zlibc.so ] ; then
		library=/lib/zlibc.so
	fi
fi

echo -n "Library to patch?"
if [ X$library != X ] ; then
	echo -n " [default is '$library']"
fi
read a
if [ "X$a" != X ]; then
	library=$a
fi
if [ X$library = X ] ; then
	exit 1
fi

echo $library >library



