1995-11-15 10:16:10 +00:00
|
|
|
#!/bin/sh
|
1997-10-04 17:13:41 +00:00
|
|
|
|
|
|
|
if [ $2 != INSTALL ]; then exit 0; fi
|
|
|
|
|
|
|
|
BINDIR=${PKG_PREFIX}/bin
|
|
|
|
for f in ${BINDIR}/MakeTeXMF ${BINDIR}/MakeTeXPK ${BINDIR}/MakeTeXTFM ${PKG_PREFIX}/share/texmf/web2c/texmf.cnf; do
|
|
|
|
if [ -f $f ]; then files_exist="${files_exist} $f"; fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -z "${files_exist}" ]; then exit 0; fi
|
|
|
|
|
|
|
|
echo '************************************************************************'
|
|
|
|
echo
|
|
|
|
if [ "x$3" = "xBATCH" ]; then
|
|
|
|
echo 'Following files will be renamed to *.old:'
|
|
|
|
else
|
|
|
|
echo 'Files listed below already exist on this system:'
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
for f in ${files_exist}; do echo $f; done
|
|
|
|
echo
|
|
|
|
if [ "x$3" != "xBATCH" ]; then
|
|
|
|
echo 'If you proceed, these files will be renamed to *.old and new files'
|
|
|
|
echo 'will be installed.'
|
1999-07-04 21:09:42 +00:00
|
|
|
if [ -z "${PACKAGE_BUILDING}" ]; then
|
|
|
|
read -p 'Would you like to proceed? (y/N)> ' ans
|
|
|
|
else
|
|
|
|
ans=yes
|
|
|
|
fi
|
1997-10-04 17:13:41 +00:00
|
|
|
case x$ans in
|
|
|
|
xy*|xY*) for f in ${files_exist} ;do mv -f $f ${f}.old; done; exit 0
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo 'Aborting the installation.'
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
for f in ${files_exist}; do mv -f $f ${f}.old; done
|
1995-11-15 10:16:10 +00:00
|
|
|
exit 0
|
|
|
|
fi
|