Révision 1220 tmp/org.txm.setups/shared/mac/INSTALL
| INSTALL (revision 1220) | ||
|---|---|---|
| 1 | 1 |
#!/bin/sh |
| 2 | 2 |
|
| 3 |
VERSION="-TXMVERSION" |
|
| 4 |
|
|
| 3 | 5 |
vercomp () {
|
| 4 | 6 |
echo "test $1 $2" |
| 5 | 7 |
if [[ $1 == $2 ]] |
| ... | ... | |
| 71 | 73 |
|
| 72 | 74 |
say $SAY_STARTINSTALL |
| 73 | 75 |
echo "** TXM postinstall: start post installation" |
| 74 |
TXMINSTALLDIR="/Applications/TXM" |
|
| 76 |
TXMINSTALLDIR="/Applications/TXM${VERSION}.app"
|
|
| 75 | 77 |
|
| 76 | 78 |
# remove "try(library(textometrieR))" from .Rprofile if any |
| 77 | 79 |
if [ -f "$HOME/.Rprofile" ]; then |
| ... | ... | |
| 86 | 88 |
|
| 87 | 89 |
say $SAY_INSTALLR |
| 88 | 90 |
if [ ! -d "/usr/local/lib/tcl8" ]; then |
| 89 |
installer -pkg "$TXMINSTALLDIR/R/tcltk-8.5.5-x11.pkg" -allowUntrusted -target / |
|
| 91 |
installer -pkg "$TXMINSTALLDIR/Contents/TXM/R/tcltk-8.5.5-x11.pkg" -allowUntrusted -target /
|
|
| 90 | 92 |
if [ $? != 0 ]; then |
| 91 |
echo "** TXM install: installation of tcltk failed. Aborting."
|
|
| 92 |
exit 1;
|
|
| 93 |
echo "** TXM install: installation of tcltk failed. Aborting." |
|
| 94 |
exit 1
|
|
| 93 | 95 |
fi |
| 94 | 96 |
else |
| 95 | 97 |
echo "Skipping tcl8 installation" |
| 96 | 98 |
fi |
| 97 | 99 |
|
| 98 | 100 |
if [ ! -d "/usr/local/share/texinfo" ]; then |
| 99 |
installer -pkg "$TXMINSTALLDIR/R/texinfo-6.1-0.pkg" -allowUntrusted -target / |
|
| 101 |
installer -pkg "$TXMINSTALLDIR/Contents/TXM/R/texinfo-6.1-0.pkg" -allowUntrusted -target /
|
|
| 100 | 102 |
if [ $? != 0 ]; then |
| 101 |
echo "** TXM install: installation of texinfo failed. Aborting."
|
|
| 102 |
exit 1;
|
|
| 103 |
echo "** TXM install: installation of texinfo failed. Aborting." |
|
| 104 |
exit 1
|
|
| 103 | 105 |
fi |
| 104 | 106 |
else |
| 105 |
echo "Skipping Texinfo installation"
|
|
| 107 |
echo "Skipping 'texinfo' installation"
|
|
| 106 | 108 |
fi |
| 107 | 109 |
|
| 108 | 110 |
if [ ! -d "/opt/X11/bin" ]; then |
| 109 |
installer -pkg "$TXMINSTALLDIR/R/XQuartz.pkg" -allowUntrusted -target / |
|
| 111 |
installer -pkg "$TXMINSTALLDIR/Contents/TXM/R/XQuartz.pkg" -allowUntrusted -target /
|
|
| 110 | 112 |
if [ $? != 0 ]; then |
| 111 |
echo "** TXM install: installation of XQuartz failed. Aborting."
|
|
| 112 |
exit 1;
|
|
| 113 |
echo "** TXM install: installation of XQuartz failed. Aborting." |
|
| 114 |
exit 1
|
|
| 113 | 115 |
fi |
| 114 | 116 |
else |
| 115 |
echo "Skipping XQartz installation" |
|
| 117 |
echo "Skipping XQuartz installation"
|
|
| 116 | 118 |
fi |
| 117 | 119 |
|
| 118 |
tar xzf "$TXMINSTALLDIR/R/R.tar.gz" -C "$TXMINSTALLDIR/R" |
|
| 119 |
if [ $? != 0 ]; then |
|
| 120 |
echo "** TXM install: failed to extract R binaries. Aborting." |
|
| 121 |
exit 1; |
|
| 122 |
fi |
|
| 123 |
|
|
| 124 | 120 |
say $SAY_CREATESTAMP |
| 125 | 121 |
echo "** TXM postinstall: create STAMP file" |
| 126 | 122 |
# Create STAMP |
| ... | ... | |
| 134 | 130 |
say $SAY_SETFILERIGHTS |
| 135 | 131 |
echo "** TXM postinstall: set rights" |
| 136 | 132 |
# Set executable files |
| 137 |
chmod -R +rx "$TXMINSTALLDIR/cwb/bin" |
|
| 138 |
chmod +x "$TXMINSTALLDIR"/TXM/plugins/CQP.macosx*/res/macosx/* |
|
| 133 |
chmod +x "$TXMINSTALLDIR"/Contents/TXM/plugins/CQP.macosx*/res/macosx/* |
|
| 139 | 134 |
|
| 140 | 135 |
chmod -R +r "$TXMINSTALLDIR" |
| 141 |
chmod +rx "$TXMINSTALLDIR/TXM.app/Contents/MacOS/TXM"
|
|
| 136 |
chmod +rx "$TXMINSTALLDIR/Contents/MacOS/TXM" |
|
| 142 | 137 |
chmod -R +rx /opt/local/lib |
| 143 | 138 |
|
| 144 | 139 |
echo "sudo chown -R $USER $TXMINSTALLDIR" |
Formats disponibles : Unified diff