Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / testing / sisyphus / bin / install-plugins.sh
blobbf6e0a082f84b19d63fef81746769eb1c02f2d9c
1 #!/bin/bash -e
2 # -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
16 # The Original Code is mozilla.org code.
18 # The Initial Developer of the Original Code is
19 # Mozilla Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 2006.
21 # the Initial Developer. All Rights Reserved.
23 # Contributor(s):
24 # Bob Clary <bob@bclary.com>
26 # Alternatively, the contents of this file may be used under the terms of
27 # either the GNU General Public License Version 2 or later (the "GPL"), or
28 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
40 source $TEST_DIR/bin/library.sh
43 # options processing
45 options="p:b:x:D:d:"
46 function usage()
48 cat <<EOF
49 usage:
50 $SCRIPT -p product -b branch -x executablepath -D directory [-d datafiles]
52 variable description
53 =============== ============================================================
54 -p product required. firefox, thunderbird or fennec
55 -b branch required. 1.8.0|1.8.1|1.9.0|1.9.1
56 -x executablepath required. path to browser executable
57 -D directory required. path to location of plugins/components
58 -d datafiles optional. one or more filenames of files containing
59 environment
60 variable definitions to be included.
62 note that the environment variables should have the same names as in the
63 "variable" column.
65 EOF
66 exit 1
69 unset product branch executablepath directory datafiles
71 while getopts $options optname ;
72 do
73 case $optname in
74 p) product=$OPTARG;;
75 b) branch=$OPTARG;;
76 x) executablepath=$OPTARG;;
77 D) directory=$OPTARG;;
78 d) datafiles=$OPTARG;;
79 esac
80 done
82 # include environment variables
83 loadata $datafiles
85 if [[ -z "$product" || -z "$branch" || \
86 -z "$executablepath" || -z "$directory" ]]; then
87 usage
90 if [[ "$product" != "firefox" && "$product" != "thunderbird" && "$product" != "fennec" ]]; then
91 error "product \"$product\" must be one of firefox, thunderbird or fennec" $LINENO
94 executable=`get_executable $product $branch $executablepath`
96 executablepath=`dirname $executable`
99 # install plugins and components
101 echo "$SCRIPT: installing plugins from $directory/ in $executablepath/"
102 cp -r "$directory/$OSID/" "$executablepath/"