Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / testing / release / minotaur / grabEULA.sh
blobb98c33e4c3a3961f4264461323da3ed1a0aed57d
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is Mozilla Corporation Code.
16 # The Initial Developer of the Original Code is
17 # Clint Talbert.
18 # Portions created by the Initial Developer are Copyright (C) 2007
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Clint Talbert <ctalbert@mozilla.com>
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 options="f:m:p:"
41 function usage()
43 cat<<EOF
44 usage:
45 $script -f FirefoxDir -m MinotaurDir -p partnerName
47 variable description
48 ============= ================================================
49 -m MinotaurDir required, the path to the directory where Minotaur is
50 -f firefoxDir required, path to Firefox installed build
51 -p partnerName required, name of the partner extension
53 NOTES
54 ======
55 Uses checks the partner preference file in the firefoxDir for the initial value
56 of the browser.EULA.2.accpected" preference, and stores that value into a file
57 in the minotaur directory.
59 EOF
60 exit 2
63 while getopts $options optname ;
65 case $optname in
66 m) minotaurdir=$OPTARG;;
67 f) fxdir=$OPTARG;;
68 p) ptrname=$OPTARG;;
69 esac
70 done
72 # If anything is not defined, display the usage string above
73 if [[ -z "$fxdir" || -z "$ptrname" || -z "$minotaurdir" ]]
74 then
75 usage
78 grep "browser.EULA.2.accepted" $fxdir/extensions/$ptrname/defaults/preferences/partner.js > $minotaurdir/EULA.txt
79 sed '/browser.EULA.2.accepted/s/false/true/' $fxdir/extensions/$ptrname/defaults/preferences/partner.js > $fxdir/extensions/$ptrname/defaults/preferences/partner-new.js
80 cp $fxdir/extensions/$ptrname/defaults/preferences/partner-new.js $fxdir/extensions/$ptrname/defaults/preferences/partner.js