2001-03-19 23:36:52 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
echo "#!/bin/sh" > customize.$$
|
|
|
|
echo "sed \\" > customize.$$
|
|
|
|
chmod +x customize.$$
|
|
|
|
|
|
|
|
################################################################
|
2004-11-03 15:20:32 +01:00
|
|
|
# $Id: configure,v 1.4 2004-11-03 14:20:32 hjp Exp $
|
2001-08-12 18:08:30 +02:00
|
|
|
# find a find which understands -printf
|
2001-03-19 23:36:52 +01:00
|
|
|
#
|
|
|
|
touch find-printf.$$.1
|
|
|
|
today=`date '+%Y-%m-%d'`
|
|
|
|
for i in /bin/find /usr/bin/find /usr/local/bin/find
|
|
|
|
do
|
2001-03-19 23:48:23 +01:00
|
|
|
if [ "`$i find-printf.$$.1 -printf '%TY-%Tm-%Td %p'`" = "$today find-printf.$$.1" ]
|
2001-03-19 23:36:52 +01:00
|
|
|
then
|
|
|
|
echo $i works
|
|
|
|
find="$i"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -z "$find" ]
|
|
|
|
then
|
|
|
|
echo could not find a working find command, sorry.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo " -e 's,@@@find@@@,$find,g' \\" >> customize.$$
|
|
|
|
rm find-printf.$$.?
|
|
|
|
|
2001-03-19 23:48:23 +01:00
|
|
|
# $Log: configure,v $
|
2004-11-03 15:20:32 +01:00
|
|
|
# Revision 1.4 2004-11-03 14:20:32 hjp
|
|
|
|
# Added check for perl.
|
2001-03-19 23:48:23 +01:00
|
|
|
#
|
2001-08-12 18:08:30 +02:00
|
|
|
# Revision 1.2 2001/03/19 22:50:28 hjp
|
|
|
|
# Fixed description.
|
2001-03-19 23:48:23 +01:00
|
|
|
#
|
|
|
|
# Revision 1.1 2001/03/19 22:44:39 hjp
|
|
|
|
# *** empty log message ***
|
|
|
|
#
|
2004-11-03 15:20:32 +01:00
|
|
|
################################################################
|
|
|
|
# find a working perl:
|
|
|
|
#
|
|
|
|
for i in /usr/bin/perl /usr/local/bin/perl /usr/bin/perl5 /usr/local/bin/perl5
|
|
|
|
do
|
|
|
|
if $i -e 'exit ($] < 5.000)'
|
|
|
|
then
|
|
|
|
echo $i works
|
|
|
|
perl="$i"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -z "$perl" ]
|
|
|
|
then
|
|
|
|
echo could not find a working perl command, sorry.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo " -e 's,@@@perl@@@,$perl,g' \\" >> customize.$$
|
|
|
|
|
|
|
|
|
2001-03-19 23:36:52 +01:00
|
|
|
################################################################
|
|
|
|
# finish
|
|
|
|
# Add trailing newline and rename temp file to final name
|
|
|
|
#
|
|
|
|
echo >> customize.$$
|
|
|
|
|
|
|
|
mv customize.$$ customize
|
|
|
|
|