simple/tiny/configure

49 lines
1.1 KiB
Plaintext
Raw Normal View History

2001-03-19 23:36:52 +01:00
#!/bin/sh
#
echo "#!/bin/sh" > customize.$$
echo "sed \\" > customize.$$
chmod +x customize.$$
################################################################
# $Id: configure,v 1.2 2001-03-19 22:48:23 hjp Exp $
2001-03-19 23:36:52 +01:00
# find a ln which understands -sf
#
touch find-printf.$$.1
today=`date '+%Y-%m-%d'`
for i in /bin/find /usr/bin/find /usr/local/bin/find
do
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.$$.?
# $Log: configure,v $
# Revision 1.2 2001-03-19 22:48:23 hjp
# GNUmakefile: try to rebuild configure only if source dir is there.
#
# configure: Fixed test for find -printf.
#
# psg: include f option on Linux.
#
# Revision 1.1 2001/03/19 22:44:39 hjp
# *** empty log message ***
#
2001-03-19 23:36:52 +01:00
################################################################
# finish
# Add trailing newline and rename temp file to final name
#
echo >> customize.$$
mv customize.$$ customize