Skip to content
This repository was archived by the owner on Mar 4, 2019. It is now read-only.

Commit 8140428

Browse files
committed
Changed the name of the profile.
1 parent e06ce2f commit 8140428

28 files changed

+100
-135
lines changed

README.org

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ This is a Drupal installation profile for B-Translator.
1010
#+BEGIN_EXAMPLE
1111
mkdir /var/chroot
1212
cd /var/chroot/
13-
git clone https://github.com/B-Translator/btrclient.git
14-
nohup nice btrclient/install/install.sh bcl &
13+
git clone https://github.com/B-Translator/btr_client.git
14+
nohup nice btr_client/install/install.sh bcl &
1515
tail -f nohup.out
1616
chroot bcl/ /tmp/install/config.sh
1717
chroot bcl/ rm -rf /tmp/install
@@ -38,7 +38,7 @@ This is a Drupal installation profile for B-Translator.
3838
option explicitly on the command line. For example, on a /rackspace/
3939
server it can be like this:
4040
#+BEGIN_EXAMPLE
41-
nohup nice btrclient/install/install.sh bcl \
41+
nohup nice btr_client/install/install.sh bcl \
4242
--mirror=http://mirror.rackspace.com/ubuntu/ --arch=amd64 &
4343
#+END_EXAMPLE
4444
On /amazon/ it can be like this:

btr_client.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body.maintenance-page #logo {
2-
background:transparent url(btrclient.png) no-repeat top left;
2+
background:transparent url(btr_client.png) no-repeat top left;
33
height:0;
44
overflow:hidden;
55
padding-top: 187px; /* height of logo */

btr_client.info

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ exclusive = TRUE
77
;--------------------
88
; Files
99
;--------------------
10-
files[] = btrclient.install
11-
files[] = btrclient.profile
10+
files[] = btr_client.install
11+
files[] = btr_client.profile
1212

1313
;--------------------
1414
; Core

btr_client.install

+2-37
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22
/**
33
* @file
4-
* Install functions for the profile btrclient.
4+
* Install functions for the profile btr_client.
55
*/
66

77
/**
88
* Implements hook_install().
99
*
1010
* Perform actions to set up the site for this profile.
1111
*/
12-
function btrclient_install() {
12+
function btr_client_install() {
1313
//include_once DRUPAL_ROOT . '/profiles/standard/standard.install';
1414
//standard_install();
1515

@@ -22,7 +22,6 @@ function btrclient_install() {
2222
variable_set('user_email_verification', TRUE);
2323

2424
_btrclient_install_mailsystem();
25-
_btrclient_install_actions();
2625
_btrclient_install_user_restrictions();
2726
}
2827

@@ -36,40 +35,6 @@ function _btrclient_install_mailsystem()
3635
variable_set('mail_system', $mail_system);
3736
}
3837

39-
function _btrclient_install_actions()
40-
{
41-
$site_mail = variable_get('site_mail');
42-
43-
// create actions
44-
$action_id_1 = actions_save(
45-
'system_send_email_action',
46-
'system',
47-
array(
48-
'recipient' => $site_mail,
49-
'subject' => '[btrclient] New user: [user:name]',
50-
'message' => 'New user: [user:name]',
51-
),
52-
t('Send e-mail to admin when a new user is registered')
53-
);
54-
$action_id_2 = actions_save(
55-
'system_send_email_action',
56-
'system',
57-
array(
58-
'recipient' => $site_mail,
59-
'subject' => '[btrclient] [user:name] has modified his account',
60-
'message' => 'The user [user:name] has modified his account.',
61-
),
62-
t('Send e-mail to admin when user modifies his account')
63-
);
64-
65-
// assign actions to triggers
66-
db_insert('trigger_assignments')
67-
->fields(array('hook', 'aid', 'weight'))
68-
->values(array('hook' => 'user_insert', 'aid' => $action_id_1, 'weight' => 0))
69-
->values(array('hook' => 'user_update', 'aid' => $action_id_2, 'weight' => 0))
70-
->execute();
71-
}
72-
7338
function _btrclient_install_user_restrictions() {
7439
db_insert('user_restrictions')
7540
->fields(array(

btr_client.profile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<?php
22
/**
33
* @file
4-
* Installation steps for the profile btrclient.
4+
* Installation steps for the profile btr_client.
55
*/
66

77
/**
88
* Implements hook_form_FORM_ID_alter().
99
*
1010
* Allows the profile to alter the site configuration form.
1111
*/
12-
function btrclient_form_install_configure_form_alter(&$form, $form_state) {
12+
function btr_client_form_install_configure_form_alter(&$form, $form_state) {
1313
// Pre-populate the site name with the server name.
1414
$form['site_information']['site_name']['#default_value'] = 'B-Translator';
1515
}
1616

1717
/**
1818
* Implements hook_install_tasks().
1919
*/
20-
function btrclient_install_tasks($install_state) {
20+
function btr_client_install_tasks($install_state) {
2121
// Add our custom CSS file for the installation process
22-
drupal_add_css(drupal_get_path('profile', 'btrclient') . '/btrclient.css');
22+
drupal_add_css(drupal_get_path('profile', 'btr_client') . '/btr_client.css');
2323

2424
module_load_include('inc', 'phpmailer', 'phpmailer.admin');
2525
module_load_include('inc', 'btrClient', 'btrClient.admin');
2626

2727
$tasks = array(
28-
'btrclient_mail_config' => array(
28+
'btr_client_mail_config' => array(
2929
'display_name' => st('Mail Settings'),
3030
'type' => 'form',
3131
'run' => INSTALL_TASK_RUN_IF_NOT_COMPLETED,
3232
'function' => 'phpmailer_settings_form',
3333
),
34-
'btrclient_config' => array(
34+
'btr_client_config' => array(
3535
'display_name' => st('B-Translator Settings'),
3636
'type' => 'form',
3737
'run' => INSTALL_TASK_RUN_IF_NOT_COMPLETED,

build-btrclient.make

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ core = 7.x
44
;------------------------------
55
; Build Drupal core (with patches).
66
;------------------------------
7-
includes[drupal] = https://raw.github.com/B-Translator/btrclient/master/drupal-org-core.make
7+
includes[drupal] = https://raw.github.com/B-Translator/btr_client/master/drupal-org-core.make
88
;includes[drupal] = drupal-org-core.make
99

1010
;------------------------------
11-
; Get profile btrclient.
11+
; Get profile btr_client.
1212
;------------------------------
13-
projects[btrclient][type] = profile
14-
projects[btrclient][download][type] = git
15-
projects[btrclient][download][url] = https://github.com/B-Translator/btrclient.git
16-
;projects[btrclient][download][url] = /var/www/B-Translator
17-
;projects[btrclient][download][branch] = dev
13+
projects[btr_client][type] = profile
14+
projects[btr_client][download][type] = git
15+
projects[btr_client][download][url] = https://github.com/B-Translator/btr_client.git
16+
;projects[btr_client][download][url] = /var/www/btr_client
17+
;projects[btr_client][download][branch] = dev

dev/README.org

+16-16
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ them can be used on any Drupal project.
3737
suitable. It can be started and stopped like this:
3838
#+BEGIN_EXAMPLE
3939
chroot /var/chroot/bcl/
40-
/var/www/bcl/profiles/btrclient/dev/apache2.sh start
41-
/var/www/bcl/profiles/btrclient/dev/apache2.sh stop
40+
/var/www/bcl/profiles/btr_client/dev/apache2.sh start
41+
/var/www/bcl/profiles/btr_client/dev/apache2.sh stop
4242
#+END_EXAMPLE
4343

4444
*Important:* When /apache2/ is started, the services /nginx/,
@@ -65,10 +65,10 @@ them can be used on any Drupal project.
6565
It can be done with the script =dev/install.sh=:
6666
#+BEGIN_EXAMPLE
6767
chroot /var/chroot/bcl/
68-
/var/www/bcl/profiles/btrclient/dev/reinstall.sh
68+
/var/www/bcl/profiles/btr_client/dev/reinstall.sh
6969
#+END_EXAMPLE
7070
It will rebuild the Drupal directory with *drush make* and install
71-
the btrclient profile with *drush site-install*, and then do all
71+
the btr_client profile with *drush site-install*, and then do all
7272
the rest of configurations just like they are done during
7373
installation.
7474

@@ -80,7 +80,7 @@ them can be used on any Drupal project.
8080
=dev/install.sh=:
8181
#+BEGIN_EXAMPLE
8282
chroot /var/chroot/bcl/
83-
/var/www/bcl/profiles/btrclient/dev/reinstall-db.sh
83+
/var/www/bcl/profiles/btr_client/dev/reinstall-db.sh
8484
#+END_EXAMPLE
8585

8686
It is useful for testing the features. Usually, when features are
@@ -95,7 +95,7 @@ them can be used on any Drupal project.
9595
Inside the chroot I make a clone for development like this:
9696
#+BEGIN_EXAMPLE
9797
chroot /var/chroot/bcl/
98-
cd /var/www/bcl/profiles/btrclient/
98+
cd /var/www/bcl/profiles/btr_client/
9999
dev/clone.sh dev
100100
#+END_EXAMPLE
101101

@@ -111,7 +111,7 @@ them can be used on any Drupal project.
111111
(remove/erase) a clone, we can use *clone_rm.sh* like this:
112112
#+BEGIN_EXAMPLE
113113
chroot /var/chroot/bcl/
114-
cd /var/www/bcl/profiles/btrclient/
114+
cd /var/www/bcl/profiles/btr_client/
115115
dev/clone_rm.sh dev
116116
#+END_EXAMPLE
117117

@@ -121,8 +121,8 @@ them can be used on any Drupal project.
121121
#+BEGIN_EXAMPLE
122122
chroot /var/chroot/bcl/
123123
cd /var/www/
124-
drush @bcl php-script bcl/profiles/btrclient/config.php dev1
125-
drush @dev php-script bcl/profiles/btrclient/config.php dev2
124+
drush @bcl php-script bcl/profiles/btr_client/config.php dev1
125+
drush @dev php-script bcl/profiles/btr_client/config.php dev2
126126
#+END_EXAMPLE
127127

128128
It will set site_name to 'B-Translator (dev1)', will make site email
@@ -146,7 +146,7 @@ them can be used on any Drupal project.
146146
#+BEGIN_EXAMPLE
147147
chroot /var/chroot/bcl/
148148
cd /var/www/
149-
ln -s bcl_dev/profiles/btrclient/ B-Translator
149+
ln -s bcl_dev/profiles/btr_client/ .
150150

151151
B-Translator/dev/snapshot.sh make
152152
B-Translator/dev/snapshot.sh make @dev
@@ -184,7 +184,7 @@ them can be used on any Drupal project.
184184
chroot, I create a symbolic link like this:
185185
#+BEGIN_EXAMPLE
186186
cd /var/chroot/
187-
ln -s bcl/var/www/bcl_dev/profiles/btrclient/ \
187+
ln -s bcl/var/www/bcl_dev/profiles/btr_client/ \
188188
dev
189189
#+END_EXAMPLE
190190

@@ -197,8 +197,8 @@ them can be used on any Drupal project.
197197
* Pushing commits to github
198198

199199
The copy of the application on
200-
=/var/www/bcl_dev/profiles/btrclient/= (as well as the one
201-
on =/var/www/bcl/profiles/btrclient/=) are actually clones
200+
=/var/www/bcl_dev/profiles/btr_client/= (as well as the one
201+
on =/var/www/bcl/profiles/btr_client/=) are actually clones
202202
of the git repository at https://github.com/dashohoxha/B-Translator
203203
so we can *pull* from it and *push* to it. Pulling (to get
204204
up-to-date) can be done by everybody, however pushing requires a
@@ -267,7 +267,7 @@ them can be used on any Drupal project.
267267
making is OK.
268268
4. Push changes upwards to github, like this:
269269
#+BEGIN_EXAMPLE
270-
cd /var/www/bcl_dev/profiles/btrclient
270+
cd /var/www/bcl_dev/profiles/btr_client
271271
git checkout master
272272
git merge dev [--squash]
273273
git push
@@ -278,7 +278,7 @@ them can be used on any Drupal project.
278278
the branch *dev* and create a new one.
279279
5. Make a git pull on *bcl* and sync it with *bcl_dev*
280280
#+BEGIN_EXAMPLE
281-
cd /var/www/bcl/profiles/btrclient
281+
cd /var/www/bcl/profiles/btr_client
282282
git pull
283283
#+END_EXAMPLE
284284

@@ -320,7 +320,7 @@ them can be used on any Drupal project.
320320
'ssh-options' => '-p 2201 -i /root/.ssh/id_rsa',
321321

322322
'path-aliases' => array (
323-
'%profile' => 'profiles/btrclient',
323+
'%profile' => 'profiles/btr_client',
324324
'%data' => '/var/www/data',
325325
'%pofiles' => '/var/www/PO_files',
326326
'%exports' => '/var/www/exports',

dev/git-clone-dev.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#!/bin/bash
22
### Clone the dev branch from
3-
### /var/www/bcl_dev/profiles/btrclient/
3+
### /var/www/bcl_dev/profiles/btr_client/
44

55
### create a symlink /var/www/bcl to the git repo
66
cd /var/www/
7-
test -h B-Translator || ln -s bcl_dev/profiles/btrclient/ B-Translator
7+
test -h btr_client || ln -s bcl_dev/profiles/btr_client/ .
88

99
### on the repo create a 'dev' branch
10-
cd B-Translator/
10+
cd btr_client/
1111
git branch dev master
1212

1313
### clone the dev branch
1414
cd /var/www/bcl/profiles/
15-
rm -rf btrclient-bak
16-
mv btrclient btrclient-bak
17-
git clone -b dev /var/www/B-Translator btrclient
15+
rm -rf btr_client-bak
16+
mv btr_client btr_client-bak
17+
git clone -b dev /var/www/btr_client
1818

1919
### copy contrib libraries and modules
20-
cp -a btrclient-bak/libraries/ btrclient/
21-
cp -a btrclient-bak/modules/contrib/ btrclient/modules/
22-
cp -a btrclient-bak/modules/libraries/ btrclient/modules/
23-
cp -a btrclient-bak/themes/contrib/ btrclient/themes/
20+
cp -a btr_client-bak/libraries/ btr_client/
21+
cp -a btr_client-bak/modules/contrib/ btr_client/modules/
22+
cp -a btr_client-bak/modules/libraries/ btr_client/modules/
23+
cp -a btr_client-bak/themes/contrib/ btr_client/themes/

dev/reinstall-db.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
### Reinstall the Drupal profile 'btrclient' and its features.
2+
### Reinstall the Drupal profile 'btr_client' and its features.
33
### This script touches only the database of Drupal (bcl)
44
### and nothing else. Useful for testing the features.
55
###
@@ -40,7 +40,7 @@ $mysql -e "
4040
### start site installation
4141
sed -e '/memory_limit/ c memory_limit = -1' -i /etc/php5/cli/php.ini
4242
cd $drupal_dir
43-
drush site-install --verbose --yes btrclient \
43+
drush site-install --verbose --yes btr_client \
4444
--db-url="mysql://$db_user:$db_pass@localhost/$db_name" \
4545
--site-name="$site_name" --site-mail="$site_mail" \
4646
--account-name="$account_name" --account-pass="$account_pass" --account-mail="$account_mail"

dev/reinstall.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
### Reinstall btrclient from scratch.
2+
### Reinstall btr_client from scratch.
33
### Useful for testing installation scripts.
44

55
export drupal_dir=/var/www/bcl
@@ -10,9 +10,9 @@ mv $drupal_dir $drupal_dir-bak
1010
cd $(dirname $0)
1111
cd ../install/install-scripts/
1212

13-
./20-make-and-install-btrclient.sh
14-
./30-git-clone-btrclient.sh
15-
./40-configure-btrclient.sh
13+
./20-make-and-install.sh
14+
./30-git-clone.sh
15+
./40-configure.sh
1616

1717
../config.sh
1818

dev/snapshot.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ case $action in
7777

7878
umount $drupal_dir/cache
7979
mv $drupal_dir $drupal_dir-del
80-
mv $snapshot/btrclient* $drupal_dir
80+
mv $snapshot/btr_client* $drupal_dir
8181
mount -a
8282

83-
profile_dir=$drupal_dir/profiles/btrclient
83+
profile_dir=$drupal_dir/profiles/btr_client
8484
mv $profile_dir $profile_dir-old
85-
cp -a $drupal_dir-del/profiles/btrclient $profile_dir
85+
cp -a $drupal_dir-del/profiles/btr_client $profile_dir
8686

8787
for subdir in libraries modules/{contrib,libraries} themes/contrib
8888
do

docs/INSTALL.org

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ B-Translator.
121121
http://drupal.org/project/emacs
122122

123123

124-
* Install the profile btrclient
124+
* Install the profile btr_client
125125

126126
#+BEGIN_EXAMPLE
127127
cd /var/www/
128-
sudo git clone https://github.com/dashohoxha/B-Translator.git
129-
sudo B-Translator/install/dev/all.sh
128+
sudo git clone https://github.com/B-Translator/btr_client.git
129+
sudo btr_client/install/dev/all.sh
130130
#+END_EXAMPLE
131131

132132

0 commit comments

Comments
 (0)