1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788
|
#!/bin/sh
#
# Copyright(C) 2002-2006 Adobe Macromedia Software LLC. All rights reserved.
#
# Adobe Flash Player Installer
#
PRODUCT="Adobe Flash Player"
VERSION="9"
PLATFORM="Linux"
FPVERSIONMAJ=9
FPVERSIONMIN=60
FPVERSIONREV=0
# Environment variables
PATH=.:/bin:/usr/bin:/usr/local/bin:/sbin:$PATH
export PATH
# Get the path of this script
cwd=`dirname $0`
# Minimum glibc
MIN_GLIBCMAJOR=2
MIN_GLIBCMINOR=3
##############################
# Subroutines
##############################
# the os is not supported
exit_os () {
echo ""
echo "ERROR: Your operating system is not supported by the"
echo " $PRODUCT installer."
echo ""
exit 1
}
# the architecture is not supported
exit_cpu () {
echo ""
echo "ERROR: Your architecture, \'$1\', is not supported by the"
echo " $PRODUCT installer."
echo ""
exit 1
}
# glibc is older than supported
exit_glibc () {
echo ""
echo "ERROR: Your glibc library is older than $MIN_GLIBCMAJOR.$MIN_GLIBCMINOR."
echo " Please update your glibc library."
echo ""
exit 1
}
# exit installer
exit_error () {
echo ""
echo "Exiting the $PRODUCT $VERSION installer."
echo ""
exit 1
}
# check glibc
check_glibc () {
ICONV=`iconv --version | sed -e '2,$d'`
if [ $? -ne 0 ]; then
echo "no-iconv"
else
ICONVVER=`echo "$ICONV" | awk '{print $4}'`
GLIBCMAJOR=`echo $ICONVVER | cut -d'.' -f1`
GLIBCMINOR=`echo $ICONVVER | cut -d'.' -f2`
if [ \( $GLIBCMAJOR -ge $MIN_GLIBCMAJOR \) -a \( $GLIBCMINOR -ge $MIN_GLIBCMINOR \) ]; then
echo "valid-glibc"
else
echo "invalid-glibc"
fi
fi
}
# check entered directory
check_browser_dir () {
CHECKDIR="$1"
# blank?
if [ -z "$CHECKDIR" ]; then
echo "blank"
exit
fi
# is a directory?
if [ -d "$CHECKDIR" ]; then
# is writable?
if [ -w "$CHECKDIR" ]; then
# contains plugins and components dirs?
if [ -d "$CHECKDIR/plugins" -a -d "$CHECKDIR/components" ]; then
# could be Mozilla or Netscape
if [ ! -w "$CHECKDIR/plugins" ]; then
echo "invalid-plugins-not-writable"
return
else
echo "valid"
return
fi
elif [ -d "$CHECKDIR/plugins" ]; then
if [ ! -w "$CHECKDIR/plugins" ]; then
echo "invalid-plugins-not-writable"
return
fi
# is Opera or Netscape Communicator?
OPERABIN=`find $CHECKDIR -type f -name "opera" -print`
if [ -f "$OPERABIN" ]; then
echo "valid-opera"
return
elif [ -f "$CHECKDIR/netscape-communicator" ]; then
echo "valid-communicator"
return
fi
fi
else
echo "invalid-not-writable"
return
fi
else
echo "invalid-not-directory"
return
fi
echo "invalid"
}
# fix dir if necessary
fix_dir () {
FIXDIR="$1"
FIRSTCHAR=`expr "$FIXDIR" : '\(.\).*'`
if [ "$FIRSTCHAR" != '/' ]; then
currentdir=`pwd`
echo "$currentdir/$FIXDIR"
else
echo "$1"
fi
}
# warn libflashplayer.so is a symbolic link
warn_symbolic_link () {
echo ""
echo "WARNING: The $PRODUCT binary is a symbolic link."
echo " The installer will replace this symbolic link with the actual binary."
echo ""
}
# compare versions
compare_versions () {
BIN="$1"
MYFPVERSIONSTR=`strings "$1" | grep -e "^Shockwave Flash [.\d+]*" | sed -e "s/Shockwave Flash //g"`
MYFPVERSION=`echo "$MYFPVERSIONSTR" | awk '{print $1}'`
MYFPVERSIONMAJ=`echo "$MYFPVERSION" | cut -d'.' -f1`
MYFPVERSIONMIN=`echo "$MYFPVERSION" | cut -d'.' -f2`
MYFPVERSIONREV=`echo "$MYFPVERSIONSTR" | awk '{print $2}' | sed -e "s/^r//g"`
# check major version
if [ \( $MYFPVERSIONMAJ -lt $FPVERSIONMAJ \) ]; then
echo "version-older"
elif [ \( $MYFPVERSIONMAJ -gt $FPVERSIONMAJ \) ]; then
echo "version-newer"
elif [ \( $MYFPVERSIONMAJ -eq $FPVERSIONMAJ \) ]; then
# check minor version
if [ \( $MYFPVERSIONMIN -lt $FPVERSIONMIN \) ]; then
echo "version-older"
elif [ \( $MYFPVERSIONMIN -gt $FPVERSIONMIN \) ]; then
echo "version-newer"
elif [ \( $MYFPVERSIONMIN -eq $FPVERSIONMIN \) ]; then
# check rev version
if [ \( $MYFPVERSIONREV -lt $FPVERSIONREV \) ]; then
echo "version-older"
elif [ \( $MYFPVERSIONREV -gt $FPVERSIONREV \) ]; then
echo "version-newer"
elif [ \( $MYFPVERSIONREV -eq $FPVERSIONREV \) ]; then
echo "version-same"
fi
fi
fi
}
# check plugins dir
check_plugins_dir () {
CHECKPLUGINSDIR="$1"
if [ -d "$CHECKPLUGINSDIR" ]; then
# does it exist?
if [ -e "$CHECKPLUGINSDIR/libflashplayer.so" ]; then
# is it a file?
if [ -f "$CHECKPLUGINSDIR/libflashplayer.so" ]; then
# is it a symbolic link?
if [ -L "$CHECKPLUGINSDIR/libflashplayer.so" ]; then
warn_symbolic_link "$CHECKPLUGINSDIR/libflashplayer.so"
SYMBOLIC_LINK=1
else
VERSIONSTATUS=`compare_versions "$CHECKPLUGINSDIR/libflashplayer.so"`
case $VERSIONSTATUS in
version-older)
echo ""
echo "WARNING: An older version of the $PRODUCT has been detected in"
echo " $CHECKPLUGINSDIR."
echo " The installer will overwrite this existing binary."
echo ""
;;
version-newer)
echo ""
echo "WARNING: A newer version of the $PRODUCT has been detected in"
echo " $CHECKPLUGINSDIR."
echo " The installer will overwrite this existing binary."
echo ""
;;
version-same)
echo ""
echo "WARNING: The same version of the $PRODUCT has been detected in"
echo " $CHECKPLUGINSDIR."
echo " The installer will overwrite this existing binary."
echo ""
;;
esac
fi
fi
fi
fi
}
##############################
# Main Section
##############################
ROOTINSTALL=0
# check user
USERID=`id | sed -e 's/).*//; s/^.*(//;'`
if [ "X$USERID" = "Xroot" ]; then
ROOTINSTALL=1
fi
# check OS
os=`uname -s`
if [ "X$os" != "XLinux" ]; then
exit_os
fi
# check architecture
TEMPARCH=`uname -m`
case $TEMPARCH in
i[3456]86)
ARCH=i386
;;
*)
exit_cpu $TEMPARCH
;;
esac
# check for iconv and version of glibc
GLIBCSTATUS=`check_glibc`
case $GLIBCSTATUS in
invalid-glibc)
exit_glibc
;;
esac
##################
# Welcome user
##################
echo ""
echo "Copyright(C) 2002-2006 Adobe Macromedia Software LLC. All rights reserved."
echo ""
echo "$PRODUCT $VERSION for $PLATFORM"
echo ""
echo "$PRODUCT $VERSION will be installed on this machine."
echo ""
if [ $ROOTINSTALL -eq 1 ]; then
echo "You are running the $PRODUCT installer as the \"root\" user."
echo "$PRODUCT $VERSION will be installed system-wide."
else
echo "You are running the $PRODUCT installer as a non-root user."
echo "$PRODUCT $VERSION will be installed in your home directory."
fi
echo ""
echo "Support is available at http://www.adobe.com/support/flashplayer/"
echo ""
echo "To install $PRODUCT $VERSION now, press ENTER."
echo ""
echo "To cancel the installation at any time, press Control-C."
echo ""
read cont < /dev/tty
echo ""
echo "NOTE: Please exit any browsers you may have running."
echo ""
echo "Press ENTER to continue..."
echo ""
read cont < /dev/tty
# Loop until user is done installing one or more times
okToRepeat=0
while [ $okToRepeat -eq 0 ]; do
# Loop until user is comfortable with their choices
okToProceed=0
while [ $okToProceed -eq 0 ]; do
# default variables
BROWSERDIR=""
DIRSTATUS=""
HOMEDIR=""
MOZILLA=0
MOZILLADIR=""
MOZILLA_NOT_W=0
MOZILLAPLUGIN_NOT_W=0
MOZILLASTATUS="valid"
NETSCAPE=0
NETSCAPEDIR=""
NETSCAPE_NOT_W=0
NETSCAPEPLUGIN_NOT_W=0
NETSCAPESTATUS="valid"
OPERA=0
OPERADIR=""
OPERA_NOT_W=0
OPERAPLUGIN_NOT_W=0
OPERASTATUS="valid"
SYMBOLIC_LINK=0
VERSIONSTATUS=0
############################
# Get destination directory
############################
echo ""
get_browser_dir () {
echo "Please enter the installation path of the Mozilla, Netscape,"
printf "or Opera browser (i.e., /usr/lib/mozilla): "
read dir
# fix the entered dir if necessary
FIXED_DIR=`fix_dir "$dir"`
dir="$FIXED_DIR"
# check given dir if valid
DIRSTATUS=`check_browser_dir "$dir"`
case $DIRSTATUS in
blank)
echo ""
echo "WARNING: Please do not enter a blank installation path."
echo ""
get_browser_dir
;;
invalid)
echo ""
echo "WARNING: Please enter a valid installation path."
echo ""
get_browser_dir
;;
invalid-not-writable)
echo ""
echo "WARNING: $dir is not writable."
echo ""
get_browser_dir
;;
invalid-plugins-not-writable)
echo ""
echo "WARNING: $dir/plugins is not writable."
echo ""
get_browser_dir
;;
invalid-not-directory)
echo ""
echo "WARNING: $dir is not a directory."
echo ""
get_browser_dir
;;
valid)
BROWSERDIR="$dir"
check_plugins_dir "$dir/plugins"
;;
valid-opera)
OPERA=0
BROWSERDIR="$dir"
check_plugins_dir "$dir/plugins"
;;
valid-communicator)
echo ""
echo "WARNING: You have entered the installation path to Netscape Communicator."
echo " Netscape Communicator is not officially supported."
echo ""
NETSCAPE=1
BROWSERDIR="$dir"
check_plugins_dir "$dir/plugins"
;;
invalid-opera)
echo ""
echo "ERROR: The version of the Opera browser is invalid."
echo ""
exit 1
;;
esac
}
if [ $ROOTINSTALL -eq 1 ]; then
get_browser_dir
else
HOMEDIR=`(cd ; pwd)`
COUNT=0
STATUSCOUNT=0
ERRORCOUNT=0
# Mozilla user directory
if [ -d "$HOMEDIR/.mozilla" ]; then
MOZILLA=1
MOZILLADIR="$HOMEDIR/.mozilla"
COUNT=`expr $COUNT + 1`
if [ ! -w "$HOMEDIR/.mozilla" ]; then
MOZILLA_NOT_W=1
MOZILLASTATUS="invalid"
ERRORCOUNT=`expr $ERRORCOUNT + 1`
elif [ \( -d "$HOMEDIR/.mozilla/plugins" \) -a \( ! -w "$HOMEDIR/.mozilla/plugins" \) ]; then
MOZILLAPLUGIN_NOT_W=1
MOZILLASTATUS="invalid"
ERRORCOUNT=`expr $ERRORCOUNT + 1`
else
STATUSCOUNT=`expr $STATUSCOUNT + 1`
fi
fi
# Netscape user directory
if [ -d "$HOMEDIR/.netscape" ]; then
NETSCAPE=1
NETSCAPEDIR="$HOMEDIR/.netscape"
COUNT=`expr $COUNT + 1`
if [ ! -w "$HOMEDIR/.netscape" ]; then
NETSCAPE_NOT_W=1
NETSCAPESTATUS="invalid"
ERRORCOUNT=`expr $ERRORCOUNT + 1`
elif [ \( -d "$HOMEDIR/.netscape/plugins" \) -a \( ! -w "$HOMEDIR/.netscape/plugins" \) ]; then
NETSCAPEPLUGIN_NOT_W=1
NETSCAPESTATUS="invalid"
ERRORCOUNT=`expr $ERRORCOUNT + 1`
else
STATUSCOUNT=`expr $STATUSCOUNT + 1`
fi
fi
if [ \( $MOZILLA -eq 0 \) -a \( $NETSCAPE -eq 0 \) -a \( $OPERA -eq 0 \) ]; then
echo ""
echo "ERROR: Your home directory does not have a Mozilla, Netscape, or Opera"
echo " browser user directory. Run one of these browsers at least once."
echo ""
exit 1
fi
fi
# if local install, ask which dirs to install to if more than one
if [ $ROOTINSTALL -ne 1 ]; then
if [ \( $COUNT -gt 1 \) -a \( $STATUSCOUNT -gt 1 \) ]; then
echo ""
echo "Please choose which directory to install $PRODUCT $VERSION:"
echo ""
if [ $MOZILLA -eq 1 ]; then
if [ "$MOZILLASTATUS" = "valid" ]; then
echo " [m] Install $PRODUCT $VERSION into Mozilla user"
echo " directory: $MOZILLADIR"
else
echo " * The installer has detected a Mozilla user directory but cannot install"
echo " into the following path: $MOZILLADIR"
echo " because of the following:"
fi
if [ $MOZILLA_NOT_W -eq 1 ]; then
echo ""
echo " WARNING: $MOZILLADIR is not writable."
fi
if [ \( $MOZILLA_NOT_W -eq 0 \) -a \( $MOZILLAPLUGIN_NOT_W -eq 1 \) ]; then
echo ""
echo " WARNING: $MOZILLADIR/plugins is not writable."
fi
echo ""
fi
if [ $NETSCAPE -eq 1 ]; then
if [ "$NETSCAPESTATUS" = "valid" ]; then
echo " [n] Install $PRODUCT $VERSION into Netscape user"
echo " directory: $NETSCAPEDIR"
else
echo " * The installer has detected a Netscape user directory but cannot install"
echo " into the following path: $NETSCAPEDIR"
echo " because of the following:"
fi
if [ $NETSCAPE_NOT_W -eq 1 ]; then
echo ""
echo " WARNING: $NETSCAPEDIR is not writable."
fi
if [ \( $NETSCAPE_NOT_W -eq 0 \) -a \( $NETSCAPEPLUGIN_NOT_W -eq 1 \) ]; then
echo ""
echo " WARNING: $NETSCAPEDIR/plugins is not writable."
fi
echo ""
fi
echo " [a] All"
echo ""
else
# only one browser user directory
if [ $MOZILLA -eq 1 ]; then
if [ "$MOZILLASTATUS" = "invalid" ]; then
echo "The installer has detected a Mozilla user directory but cannot install"
echo "into the following path: $MOZILLADIR"
echo "because of the following:"
if [ $MOZILLA_NOT_W -eq 1 ]; then
echo ""
echo "WARNING: $MOZILLADIR is not writable."
echo ""
fi
if [ \( $MOZILLA_NOT_W -eq 0 \) -a \( $MOZILLAPLUGIN_NOT_W -eq 1 \) ]; then
echo ""
echo "WARNING: $MOZILLADIR/plugins is not writable."
echo ""
fi
fi
fi
if [ $NETSCAPE -eq 1 ]; then
if [ "$NETSCAPESTATUS" = "invalid" ]; then
echo "The installer has detected a Netscape user directory but cannot install"
echo "into the following path: $NETSCAPEDIR"
echo "because of the following:"
if [ $NETSCAPE_NOT_W -eq 1 ]; then
echo ""
echo "WARNING: $NETSCAPEDIR is not writable."
echo ""
fi
if [ \( $NETSCAPE_NOT_W -eq 0 \) -a \( $NETSCAPEPLUGIN_NOT_W -eq 1 \) ]; then
echo ""
echo "WARNING: $NETSCAPEDIR/plugins is not writable."
echo ""
fi
fi
fi
if [ $OPERA -eq 1 ]; then
if [ "$OPERASTATUS" = "invalid" ]; then
echo "The installer has detected a Opera user directory but cannot install"
echo "into the following path: $OPERADIR"
echo "because of the following:"
if [ $OPERA_NOT_W -eq 1 ]; then
echo ""
echo "WARNING: $OPERADIR is not writable."
echo ""
fi
if [ \( $OPERA_NOT_W -eq 0 \) -a \( $OPERAPLUGIN_NOT_W -eq 1 \) ]; then
echo ""
echo "WARNING: $OPERADIR/plugins is not writable."
echo ""
fi
fi
fi
fi
fi
select_local_install () {
printf "Please choose a directory: "
read inum
if [ \( \( "$inum" = "m" \) -o \( "$inum" = "M" \) \) -a \( \( $MOZILLA -eq 1 \) -a \( "$MOZILLASTATUS" = "valid" \) \) ]; then
NETSCAPE=0
OPERA=0
check_plugins_dir "$MOZILLADIR/plugins"
elif [ \( \( $NETSCAPE -eq 1 \) -a \( "$NETSCAPESTATUS" = "valid" \) \) -a \( \( "$inum" = "n" \) -o \( "$inum" = "N" \) \) ]; then
MOZILLA=0
OPERA=0
check_plugins_dir "$NETSCAPEDIR/plugins"
elif [ \( \( $OPERA -eq 1 \) -a \( "$OPERASTATUS" = "valid" \) \) -a \( \( "$inum" = "o" \) -o \( "$inum" = "O" \) \) ]; then
MOZILLA=0
NETSCAPE=0
check_plugins_dir "$OPERADIR/plugins"
elif [ \( "$inum" = "a" \) -o \( "$inum" = "A" \) ]; then
# do nothing
NOTHING=1
if [ \( $MOZILLA -eq 1 \) -a \( "$MOZILLASTATUS" = "valid" \) ]; then
check_plugins_dir "$MOZILLADIR/plugins"
fi
if [ \( $NETSCAPE -eq 1 \) -a \( "$NETSCAPESTATUS" = "valid" \) ]; then
check_plugins_dir "$NETSCAPEDIR/plugins"
fi
if [ \( $OPERA -eq 1 \) -a \( "$OPERASTATUS" = "valid" \) ]; then
check_plugins_dir "$OPERADIR/plugins"
fi
else
echo ""
echo "ERROR: Please choose a directory from the list."
echo ""
select_local_install
fi
}
if [ $ROOTINSTALL -ne 1 ]; then
if [ \( $COUNT -gt 1 \) -a \( $STATUSCOUNT -gt 1 \) ]; then
select_local_install
fi
if [ $COUNT -eq $ERRORCOUNT ]; then
exit_error
fi
fi
##########
# Summary
##########
echo ""
echo ""
echo "----------- Install Action Summary -----------"
echo ""
echo "$PRODUCT $VERSION will be installed in the following directory:"
echo ""
if [ $ROOTINSTALL -eq 1 ]; then
echo "Browser installation directory = $BROWSERDIR"
else
if [ \( $MOZILLA -eq 1 \) -a \( "$MOZILLASTATUS" = "valid" \) ]; then
echo "Mozilla installation directory = $MOZILLADIR"
fi
if [ \( $NETSCAPE -eq 1 \) -a \( "$NETSCAPESTATUS" = "valid" \) ]; then
echo "Netscape installation directory = $NETSCAPEDIR"
fi
if [ \( $OPERA -eq 1 \) -a \( "$OPERASTATUS" = "valid" \) ]; then
echo "Opera installation directory = $OPERADIR"
fi
fi
echo ""
# okay to continue?
get_installagreement () {
printf 'Proceed with the installation? (y/n/q): '
read yn
case $yn in
y | Y)
okToProceed=1
;;
n | N)
continue
;;
q | Q)
exit 1
;;
*)
echo ""
echo "Please enter 'y', 'n', or 'q'."
get_installagreement
;;
esac
}
get_installagreement
done
#######################
# Perform installation
#######################
#--------------
# copy plug-in
#--------------
# system-wide
if [ $ROOTINSTALL -eq 1 ]; then
# copy plug-in
# remove symbolic link before copying
if [ $SYMBOLIC_LINK -eq 1 ]; then
rm -f "$BROWSERDIR/plugins/libflashplayer.so"
fi
cp -f "$cwd/libflashplayer.so" "$BROWSERDIR/plugins"
else
# local
if [ $MOZILLA -eq 1 ]; then
if [ \( ! -d "$MOZILLADIR/plugins" \) -a \( $MOZILLA_NOT_W -eq 0 \) ]; then
mkdir -p "$MOZILLADIR/plugins"
fi
if [ \( $MOZILLA_NOT_W -eq 0 \) -a \( $MOZILLAPLUGIN_NOT_W -eq 0 \) ]; then
cp -f "$cwd/libflashplayer.so" "$MOZILLADIR/plugins"
fi
fi
if [ $NETSCAPE -eq 1 ]; then
if [ \( ! -d "$NETSCAPEDIR/plugins" \) -a \( $NETSCAPE_NOT_W -eq 0 \) ]; then
mkdir -p "$NETSCAPEDIR/plugins"
fi
if [ \( $NETSCAPE_NOT_W -eq 0 \) -a \( $NETSCAPEPLUGIN_NOT_W -eq 0 \) ]; then
cp -f "$cwd/libflashplayer.so" "$NETSCAPEDIR/plugins"
fi
fi
if [ $OPERA -eq 1 ]; then
if [ \( ! -d "$OPERADIR/plugins" \) -a \( $OPERA_NOT_W -eq 0 \) ]; then
mkdir -p "$OPERADIR/plugins"
fi
if [ \( $OPERA_NOT_W -eq 0 \) -a \( $OPERAPLUGIN_NOT_W -eq 0 \) ]; then
cp -f "$cwd/libflashplayer.so" "$OPERADIR/plugins"
fi
fi
fi
#----------------------
# remove xpti.dat file
#----------------------
if [ $ROOTINSTALL -eq 1 ]; then
if [ -f "$BROWSERDIR/components/xpti.dat" ]; then
rm -f "$BROWSERDIR/components/xpti.dat"
fi
else
if [ \( $MOZILLA -eq 1 \) -o \( $NETSCAPE -eq 1 \) ]; then
# don't know where xpti.dat file is located
echo ""
echo "NOTE: Please ask your administrator to remove the xpti.dat from the"
echo " components directory of the Mozilla or Netscape browser."
echo ""
fi
fi
#-----------------
# set permissions
#-----------------
if [ $ROOTINSTALL -eq 1 ]; then
chmod 755 "$BROWSERDIR/plugins/libflashplayer.so"
else
if [ $MOZILLA -eq 1 ]; then
if [ \( $MOZILLA_NOT_W -eq 0 \) -a \( $MOZILLAPLUGIN_NOT_W -eq 0 \) ]; then
chmod 755 "$MOZILLADIR/plugins/libflashplayer.so"
fi
fi
if [ $NETSCAPE -eq 1 ]; then
if [ \( $NETSCAPE_NOT_W -eq 0 \) -a \( $NETSCAPEPLUGIN_NOT_W -eq 0 \) ]; then
chmod 755 "$NETSCAPEDIR/plugins/libflashplayer.so"
fi
fi
if [ $OPERA -eq 1 ]; then
if [ \( $OPERA_NOT_W -eq 0 \) -a \( $OPERAPLUGIN_NOT_W -eq 0 \) ]; then
chmod 755 "$OPERADIR/plugins/libflashplayer.so"
fi
fi
fi
echo ""
echo "Installation complete."
echo ""
# Ask to repeat installation?
ask_to_repeat () {
echo ""
printf 'Perform another installation? (y/n): '
read yn
case $yn in
y | Y)
continue
;;
n | N)
okToRepeat=1
break
;;
*)
echo ""
echo "Please enter 'y' or 'n'."
ask_to_repeat
;;
esac
}
ask_to_repeat
done
# Final messages.
# check MOZ_PLUGIN_PATH
if [ ! -z "$MOZ_PLUGIN_PATH" ]; then
echo ""
echo "WARNING: You have the MOZ_PLUGIN_PATH environment variable set."
echo " Either unset this environment variable or set the path in this"
echo " environment variable to the path you are installing the plug-in."
echo ""
fi
# check OPERA_PLUGIN_PATH
if [ ! -z "$OPERA_PLUGIN_PATH" ]; then
echo ""
echo "WARNING: You have the OPERA_PLUGIN_PATH environment variable set."
echo " Either unset this environment variable or append the path"
echo " you are installing the plug-in to this variable."
echo ""
fi
echo ""
echo ""
echo "Please log out of this session and log in for the changes to take effect."
echo ""
echo ""
echo "The $PRODUCT installation is complete."
echo "" |
Partager