/[drupal]/contributions/tricks/expectinstaller/getdrupal.exp
ViewVC logotype

Contents of /contributions/tricks/expectinstaller/getdrupal.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Wed Aug 23 21:54:50 2006 UTC (3 years, 3 months ago) by seanr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +9 -1 lines
Significant updates - mysql tuning, version changes, etc.
1 #!/usr/local/bin/expect -f
2 #
3 # getdrupal.exp
4 # Sean Robertson
5 # NGP Software
6 #
7 # This expect script will download Drupal and a standard set of modules
8 # from CVS (HEAD). It then grabs and unpacks tinymce into the correct
9 # location and creates and installs the database. The script should be
10 # called with the following parameters:
11 #
12 # expect getdrupal.exp database password [rootpass]
13 #
14 # The database name also gets used as the username.
15
16
17 set timeout -1
18 set database [lindex $argv 0]
19 set password [lindex $argv 1]
20 set rootpass [lindex $argv 2]
21
22 if {$rootpass != ""} {
23 set rootpass " -p[lindex $argv 2]"
24 }
25
26 spawn $env(SHELL)
27 match_max 100000
28 expect "> "
29 send -- "setenv CVSROOT \":pserver:anonymous@cvs.drupal.org:/cvs/drupal\"\r"
30 expect "> "
31 send -- "cvs login\r"
32 expect "CVS password: "
33 send -- "anonymous\r"
34 expect "> "
35 send -- "cvs co -r DRUPAL-4-7 drupal\r"
36 expect "> "
37 send -- "cd drupal\r"
38 expect "> "
39 send -- "mkdir files\r"
40 expect "> "
41 send -- "chmod a+w files\r"
42 expect "> "
43 send -- "cd modules\r"
44 expect "> "
45 send -- "setenv CVSROOT \":pserver:anonymous@cvs.drupal.org:/cvs/drupal-contrib\"\r"
46 expect "> "
47 send -- "cvs login\r"
48 expect "CVS password: "
49 send -- "anonymous\r"
50 expect "> "
51 send -- "cvs co -r DRUPAL-4-7 -d cck contributions/modules/cck\r"
52 expect "> "
53 send -- "cvs co -d crmapi contributions/modules/crmapi\r"
54 expect "> "
55 send -- "cvs co -r DRUPAL-4-7 -d devel contributions/modules/devel\r"
56 expect "> "
57 send -- "cvs co -r DRUPAL-4-7 -d event contributions/modules/event\r"
58 expect "> "
59 send -- "cvs co -r DRUPAL-4-7 -d forward contributions/modules/forward\r"
60 expect "> "
61 send -- "cvs co -r DRUPAL-4-7 -d image contributions/modules/image\r"
62 expect "> "
63 send -- "cvs co -r DRUPAL-4-7 -d location contributions/modules/location\r"
64 expect "> "
65 send -- "cvs co -r DRUPAL-4-7 -d print contributions/modules/print\r"
66 expect "> "
67 send -- "cvs co -r DRUPAL-4-7 -d tinymce contributions/modules/tinymce\r"
68 expect "> "
69 send -- "cvs co -r DRUPAL-4-7 -d urchin contributions/modules/urchin\r"
70 expect "> "
71 send -- "cvs co -r DRUPAL-4-7 -d views contributions/modules/views\r"
72 expect "> "
73 send -- "cd tinymce\r"
74 expect "> "
75 send -- "wget http://superb-east.dl.sourceforge.net/sourceforge/tinymce/tinymce_2_0_6_1.tgz\r"
76 expect "> "
77 send -- "tar -xzf tinymce_2_0_6_1.tgz\r"
78 expect "> "
79 send -- "rm tinymce_2_0_6_1.tgz\r"
80 expect "> "
81 send -- "cd ../../database\r"
82 expect "> "
83 send -- "mysql -u root$rootpass\r"
84 expect "> "
85 send -- "set global query_cache_size = 41984;\r"
86 expect "> "
87 send -- "set global thread_cache_size = 5;\r"
88 expect "> "
89 send -- "set global table_cache = 128;\r"
90 expect "> "
91 send -- "create database $database;\r"
92 expect "> "
93 send -- "grant all privileges on $database.* to '$database'@'localhost' identified by '$password' with grant option; flush privileges;\r"
94 expect "> "
95 send -- "use $database\r"
96 expect "> "
97 send -- "source database.4.0.mysql\r"
98 expect "> "
99 send -- "exit\r"
100 expect "> "
101 send -- "exit\r"
102 expect eof

  ViewVC Help
Powered by ViewVC 1.1.2