summaryrefslogtreecommitdiffstats
path: root/japanese/ptex-common/pkg-req
diff options
context:
space:
mode:
authormax <max@FreeBSD.org>1997-10-04 17:13:41 +0000
committermax <max@FreeBSD.org>1997-10-04 17:13:41 +0000
commit96748bd9239abe0c95ba161eef0bb5900c75c3d4 (patch)
treefffe6cc0587750bcc172dda993a97afc64672da7 /japanese/ptex-common/pkg-req
parente0feaa6fbea75ba16f2b3507dd233833a44d15f9 (diff)
downloadFreeBSD-ports-96748bd9239abe0c95ba161eef0bb5900c75c3d4.zip
FreeBSD-ports-96748bd9239abe0c95ba161eef0bb5900c75c3d4.tar.gz
Upgrade, 2.1.4 -> 2.1.5.
Note: This port installs only the character code independent files for pTeX and this replaces japanese/ptex2. Note #2 : Japanese/ptex2 has been repository copied to ptex-common by Satoshi.
Diffstat (limited to 'japanese/ptex-common/pkg-req')
-rw-r--r--japanese/ptex-common/pkg-req48
1 files changed, 32 insertions, 16 deletions
diff --git a/japanese/ptex-common/pkg-req b/japanese/ptex-common/pkg-req
index d6012a6..a9a628f 100644
--- a/japanese/ptex-common/pkg-req
+++ b/japanese/ptex-common/pkg-req
@@ -1,19 +1,35 @@
#!/bin/sh
-if [ "$2" != "INSTALL" ]; then
+
+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.'
+ read -p 'Would you like to proceed? (y/N)> ' ans
+ 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
exit 0
fi
-echo "***********************************************************"
-echo "* W a r n i n g *"
-echo "* This port will overwrite the existing tex installation. *"
-echo "***********************************************************"
-echo -n "Is this ok? (y/n) ==> "
-read ans;
-case x"$ans" in
- xy*|xY*)
- return 0;
- ;;
- *)
- echo "Okay, I won't install it then....";
- return 1;
- ;;
-esac
OpenPOWER on IntegriCloud