This repository was archived by the owner on Dec 3, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +133
-0
lines changed Expand file tree Collapse file tree 7 files changed +133
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ function drush8_sa() {
4
+ docker-compose exec php drush sa
5
+ }
6
+
7
+ function drush8_sql_sync() {
8
+ docker-compose exec php drush -y sql-sync $1 @self
9
+ fix_permission_for_drush8
10
+ }
11
+
12
+ function drush8_rsync() {
13
+ docker-compose exec php drush -y rsync $1 :%files @self:%files
14
+ fix_permission_for_drush8
15
+ }
16
+
17
+ function drush8_cc() {
18
+ docker-compose exec php drush -y cc all
19
+ }
20
+
21
+ function drush9_sa() {
22
+ docker-compose exec php vendor/bin/drush sa
23
+ }
24
+
25
+ function drush9_sql_sync() {
26
+ docker-compose exec php vendor/bin/drush -y sql:sync $1 @self
27
+ fix_permission_for_drush9
28
+ }
29
+
30
+ function drush9_rsync() {
31
+ docker-compose exec php vendor/bin/drush -y rsync $1 :%files @self:%files
32
+ fix_permission_for_drush9
33
+ }
34
+
35
+ function drush9_cc() {
36
+ docker-compose exec php vendor/bin/drush -y cr
37
+ }
38
+
39
+ function fix_permission_for_drush8() {
40
+ if [[ $OSTYPE == linux* ]]; then
41
+ docker-compose exec php chown -R www-data:www-data /var/www/html/sites/default/files
42
+ fi
43
+ }
44
+
45
+ function fix_permission_for_drush9() {
46
+ if [[ $OSTYPE == linux* ]]; then
47
+ docker-compose exec php chown -R www-data:www-data /var/www/html/web/sites/default/files
48
+ fi
49
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source $( dirname $0 ) /common.sh
4
+
5
+ if [ $# -ne 1 ]; then
6
+ cat << _EOT_
7
+ Usage:
8
+ $0 source
9
+
10
+ Description:
11
+ Do drush sql-sync to @self by drush v8.
12
+ You can show available "source" by "drush8_sa.sh".
13
+ If your project is created by the Drupal 7, please use drush8-sql-sync.sh.
14
+
15
+ _EOT_
16
+ exit -1
17
+ fi
18
+
19
+ drush8_rsync $1
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source $( dirname $0 ) /common.sh
4
+ drush8_sa
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source $( dirname $0 ) /common.sh
4
+
5
+ if [ $# -ne 1 ]; then
6
+ cat << _EOT_
7
+ Usage:
8
+ $0 source
9
+
10
+ Description:
11
+ Do drush sql-sync to @self by drush v8.
12
+ You can show available "source" by "drush8_sa.sh".
13
+ If your project is created by the drupal-composer/drupal-project, please use drush9-sql-sync.sh.
14
+
15
+ _EOT_
16
+ exit -1
17
+ fi
18
+
19
+ drush8_sql_sync $1
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source $( dirname $0 ) /common.sh
4
+
5
+ if [ $# -ne 1 ]; then
6
+ cat << _EOT_
7
+ Usage:
8
+ $0 source
9
+
10
+ Description:
11
+ Do drush rsync to @self by drush v9.
12
+ You can show available "source" by "drush9_sa.sh".
13
+ If your project is created by the Drupal 7, please use drush8-rsync.sh.
14
+
15
+ _EOT_
16
+ exit -1
17
+ fi
18
+
19
+ drush9_rsync $1
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source $( dirname $0 ) /common.sh
4
+ drush9_sa
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ source $( dirname $0 ) /common.sh
4
+
5
+ if [ $# -ne 1 ]; then
6
+ cat << _EOT_
7
+ Usage:
8
+ $0 source
9
+
10
+ Description:
11
+ Do drush sql-sync to @self by drush v9.
12
+ You can show available "source" by "drush9_sa.sh".
13
+ If your project is created by the Drupal 7, please use drush8-sql-sync.sh.
14
+
15
+ _EOT_
16
+ exit -1
17
+ fi
18
+
19
+ drush9_sql_sync $1
You can’t perform that action at this time.
0 commit comments