3
# Install Script for UNIX Acrobat Exchange and Reader v. 7.0.0
5
# Copyright (c)1995-2005 Adobe Systems Incorporated
8
##########################################################################
12
echo $* | awk '{ printf "%s", $0 }'
25
##########################################################################
35
if [ "$answer" ] ; then
45
echo "ERROR: Invalid response, expected \"yes\" or \"no\"."
57
h=`type $1 2> /dev/null`
75
if [ ! -f "$1" ] ; then
77
echo "ERROR: Cannot find license file ... aborting"
86
if [ $? -ne 0 ] || [ -z "$PAGER" ] ; then
89
if [ $? -eq 0 ] ; then
93
if [ $? -eq 0 ] ; then
103
if [ "$command" = "less" ]; then
104
command="$command -f"
107
$command "$LicenseFile"
110
while [ -z "$answer" ] ; do
113
$echonl "Please type \"accept\" to accept the terms and conditions of license agreement; Type \"decline\" to exit. "
116
ucanswer=`echo "${answer}" | tr '[a-z]' '[A-Z]'`
122
echo "License agreement not accepted ... aborting installation"
128
echo "ERROR: Invalid response, expected \"accept\" or \"decline\" ... try again ?"
143
if [ "$i" -a -f "$i" ] ; then
146
if [ `uname -s` = "Linux" ] ; then
147
size=`ls -lLn "$i" | ( read perm links owner group size date ; echo $size )`
149
size=`ls -lLon "$i" | ( read perm links owner size date ; echo $size )`
153
if [ "$size" ] ; then
154
total=`expr $total + $size`
160
megs=`expr $total / 1048576 + 1`
163
echo "This installation requires ${megs} MB of free disk space."
169
prev_directory="`pwd 2> /dev/null`"
171
if [ `uname -s` = "Linux" ] ; then
172
tar --no-same-owner -xpf "$2"
197
ExtractFiles "$install" "$i"
201
if [ -z "$msg" ] ; then
206
GetInstallDirectory ()
210
# defdir="/usr/local/Adobe/Acrobat7.0"
211
defdir="/usr/lib/Adobe/Acrobat7.0"
215
4.1.3*|4.1.4*|4.1C) defdir="/usr/Adobe/Acrobat7.0" ;;
216
5.*) defdir="/opt/Adobe/Acrobat7.0" ;;
221
*.09.*) defdir="/usr/Adobe/Acrobat7.0" ;;
222
*.10.*) defdir="/opt/Adobe/Acrobat7.0" ;;
223
*) defdir="/Adobe/Acrobat7.0" ;;
227
defdir="/usr/lpp/Adobe/Acrobat7.0"
231
while [ -z "$InstallDir" ] ; do
234
InstallDir="$CurrentDirectory/debian/acroread$defdir"
237
$echonl "Enter installation directory for Adobe Reader ${Version} [${InstallDir}] "
248
var=`echo $InstallDir | cut -d "\"" -f 2`
252
if [ -f /bin/csh -a -x /bin/csh ] ; then
253
var=`/bin/csh -c "echo $var"`
265
if [ -f "$InstallDir" ] ; then
268
echo "\"$InstallDir\" exists but is not a directory. Please specify a different location. "
274
if [ ! -d "$InstallDir" ] ; then
276
echo "Directory \"$InstallDir\" does not exist."
277
$echonl "Do you want to create it now? [y] "
281
if [ "$answer" ] ; then
284
mkdir -p "$InstallDir"
287
echo "Exiting installation..."
292
mkdir -p "$InstallDir"
295
if [ ! -d "$InstallDir" ] ; then
297
echo "ERROR: Cannot make directory \"$InstallDir\"."
306
if ( echo foo > "$InstallDir"/AcroWriteTest ) 2> /dev/null ; then
307
rm -f "$InstallDir"/AcroWriteTest
311
echo "ERROR: Cannot write to directory \"$InstallDir\"."
319
ReadInstallDir="$InstallDir"
327
InstallDir="$1/Reader"
329
if [ ! -e /usr/lib/libldap.so ]
331
rm -f "$InstallDir"/intellinux/lib/libldap.so 2>/dev/null
333
LIB_LDAP=`ls -tr /usr/lib/libldap.so* 2>/dev/null | tail -n 1`
335
if [ "$LIB_LDAP" = "" ]
337
LIB_LDAP=`ls -tr /usr/lib/libldap* 2>/dev/null | grep -v libldap_r | grep -v libldapcpp | grep '\.so' | tail -n 1`
340
if [ "$LIB_LDAP" != "" ]
342
ln -s $LIB_LDAP "$InstallDir"/intellinux/lib/libldap.so
346
if [ ! -e /usr/lib/liblber.so ]
348
rm -f "$InstallDir"/intellinux/lib/liblber.so 2>/dev/null
350
LIB_LBER=`ls -tr /usr/lib/liblber.so* 2>/dev/null | tail -n 1`
352
if [ "$LIB_LBER" = "" ]
354
LIB_LBER=`ls -tr /usr/lib/liblber* 2>/dev/null | grep -v liblber_r | grep '\.so' | tail -n 1`
357
if [ "$LIB_LBER" != "" ]
359
ln -s $LIB_LBER "$InstallDir"/intellinux/lib/liblber.so
369
SearchPlatformTar="$3"
370
CustomPlatformTar="$4"
373
OutputLicense "$ReadLicense"
376
PrintRequiredFree "$ReadTar" "$SearchTar" "$CustomTar" \
377
"$ReadPlatformTar" "$SearchPlatformTar" "$CustomPlatformTar"
380
if [ -z "$ReadInstallDir" ] ; then
381
GetInstallDirectory ReadInstallDir
386
InstallFiles "Installing platform independent files ... " \
387
"$ReadInstallDir" "$ReadTar" "$SearchTar" "$CustomTar"
388
InstallFiles "Installing platform dependent files ... " \
390
"$ReadPlatformTar" "$SearchPlatformTar" "$CustomPlatformTar"
393
if [ `uname -s` = "Linux" ] ; then
394
MakeLibLDAPLinks "$ReadInstallDir"
402
##############################################################
410
ScriptName=`basename "$0"`
411
CurrentDirectory=`pwd`
412
eval CurrentDirectory=\"${CurrentDirectory}\"
414
ScriptDirectory=`dirname "$0"`
415
eval ScriptDirectory=\"${ScriptDirectory}\"
420
case "${ScriptDirectory}" in
422
.) ScriptDirectory="$CurrentDirectory" ;;
423
*) ScriptDirectory="$CurrentDirectory"/"$ScriptDirectory" ;;
427
if [ $? -eq 0 ] ; then
429
if [ "$OSname" = "AIX" ] ; then
430
OSrelease=`uname -a | ( read name host minor major foo ; echo $major.$minor )`
441
if [ `echo "x\c"` = "x" ] ; then
453
for i in "${ScriptDirectory}"/* "${ScriptDirectory}"/../COMMON/* "${ScriptDirectory}"/../common/*; do
454
if [ -f "$i" ] ; then
456
*/licread.txt*|*/LICREAD.TXT*)
459
*/common.tar*|*/COMMON.TAR*)
462
*/search.tar*|*/SEARCH.TAR*)
465
*/custom.tar*|*/CUSTOM.TAR*)
468
*/solrdr.tar*|*/SSOLR.TAR*)
469
ReadSparcSolarisTar="$i"
471
*/hpuxrdr.tar*|*/HPUXRDR.TAR*)
474
*/aixrdr.tar*|*/AIXRDR.TAR*)
475
ReadRS6000AIXTar="$i"
477
*/ilinxr.tar*|*/ILINXR.TAR*)
478
ReadIntelLinuxTar="$i"
480
*/ilinxc.tar*|*/ILINXC.TAR*)
481
CustomIntelLinuxTar="$i"
489
# Validate the configurations:
494
if [ "$ReadTar" -a "$ReadLicense" ] ; then
495
if [ "$ReadSparcSolarisTar" ] ; then
496
NumConfigs=`expr $NumConfigs + 1`
497
ReadSparcSolarisNum=$NumConfigs
499
if [ "$ReadHppaHpuxTar" ] ; then
500
NumConfigs=`expr $NumConfigs + 1`
501
ReadHppaHpuxNum=$NumConfigs
503
if [ "$ReadRS6000AIXTar" ] ; then
504
NumConfigs=`expr $NumConfigs + 1`
505
ReadRS6000AIXNum=$NumConfigs
507
if [ "$ReadIntelLinuxTar" ] ; then
508
NumConfigs=`expr $NumConfigs + 1`
509
ReadIntelLinuxNum=$NumConfigs
512
if [ "$NumConfigs" = "0" ] ; then
514
echo "ERROR: No configurations found ... aborting"
517
elif [ "$NumConfigs" = "1" ] ; then
521
NumConfigs=`expr $NumConfigs + 1`
526
# Check if there is a configuration supported by this OS.
533
ReadDefaultNum="$ReadSparcSunNum"
534
DefaultName="SPARC/SunOS 4.1.3 and later"
542
ReadDefaultNum="$ReadSparcSolarisNum"
543
DefaultName="SPARC/Solaris 2.x"
551
*.09.*|*.10.*|*.11.*)
552
ReadDefaultNum="$ReadHppaHpuxNum"
560
ReadDefaultNum="$ReadRS6000AIXNum"
566
ReadDefaultNum="$ReadIntelLinuxNum"
567
DefaultName="Intel/Linux"
571
if [ -z "$ReadDefaultNum" ] ; then
573
echo "WARNING: The chosen configuration will not run on your current platform ($OSname/$OSrelease)."
574
if yesno "Continue installation? [n] " 1 ; then
583
# If multiple confurations, get the default configuration
586
if [ -z "$SingleConfig" ] ; then
587
if [ "$ReadDefaultNum" ] ; then
588
if yesno "Install default configuration, Acrobat Reader ${Version} for $DefaultName? [y] " 0 ; then
589
DefaultConfig="$ReadDefaultNum"
596
# If a single configuration available the loop will be executed once
597
# otherwise it will ask for each configuration to install
600
while [ "$NumConfigs" -gt 1 ] ; do
603
# If multiple configuration ask for which to install
606
if [ "$SingleConfig" ] ; then
610
elif [ "$DefaultConfig" ] ; then
612
ConfigNum="$DefaultConfig"
617
# Display multiple configurations
621
echo "The following configurations are available for installation:"
624
if [ "$AcroSparcSolarisNum" ] ; then
625
echo " ${AcroSparcSolarisNum}. Acrobat ${Version} for SPARC/Solaris 2.x"
627
if [ "$AcroHppaHpuxNum" ] ; then
628
echo " ${AcroHppaHpuxNum}. Acrobat ${Version} for HP-UX"
630
if [ "$AcroRS6000AIXNum" ] ; then
631
echo " ${AcroRS6000AIXNum}. Acrobat ${Version} for AIX"
633
if [ "$AcroIntelLinuxNum" ] ; then
634
echo " ${AcroIntelLinuxNum}. Acrobat ${Version} for Intel/Linux"
636
if [ "$ReadSparcSolarisNum" ] ; then
637
echo " ${ReadSparcSolarisNum}. Acrobat Reader ${Version} for SPARC/Solaris 2.x"
639
if [ "$ReadHppaHpuxNum" ] ; then
640
echo " ${ReadHppaHpuxNum}. Acrobat Reader ${Version} for HP-UX"
642
if [ "$ReadRS6000AIXNum" ] ; then
643
echo " ${ReadRS6000AIXNum}. Acrobat Reader ${Version} for AIX"
645
if [ "$ReadIntelLinuxNum" ] ; then
646
echo " ${ReadIntelLinuxNum}. Acrobat Reader ${Version} for Intel/Linux"
648
if [ "$ExitNum" ] ; then
649
echo " ${ExitNum}. Exit Acrobat installation"
653
$echonl "Enter the configuration number to install: "
660
# Install the configuration
663
if [ -z "$ConfigNum" ] ; then
666
echo "ERROR: Invalid response ... try again"
668
elif [ "$ConfigNum" = "$ReadSparcSolarisNum" ] ; then
670
InstallReader sparcsolaris "$ReadSparcSolarisTar" \
671
"$SearchSparcSolarisTar" "$CustomSparcSolarisTar"
672
ReadSparcSolarisNum=""
673
elif [ "$ConfigNum" = "$ReadHppaHpuxNum" ] ; then
675
InstallReader hppahpux "$ReadHppaHpuxTar" \
676
"$SearchHppaHpuxTar" "$CustomHppaHpuxTar"
678
elif [ "$ConfigNum" = "$ReadRS6000AIXNum" ] ; then
680
InstallReader rs6000aix "$ReadRS6000AIXTar" \
681
"$SearchRS6000AIXTar" "$CustomRS6000AIXTar"
684
elif [ "$ConfigNum" = "$ReadIntelLinuxNum" ] ; then
686
InstallReader intellinux "$ReadIntelLinuxTar" \
687
"$SearchIntelLinuxTar" "$CustomIntelLinuxTar"
690
elif [ "$ConfigNum" = "$ExitNum" ] ; then
697
echo "ERROR: Invalid response ... try again"
702
if [ "$DefaultConfig" ] ; then
706
if [ -z "$MultipleInstall" ] ; then
710
NumConfigs=`expr $NumConfigs - 1`