ctools.drush.sh
2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
# Run this from the terminal inside a drupal root folder
# i.e. DRUPAL_ROOT_DIR/sites/all/modules/contrib/ctools/tests/ctools.drush.sh
function stamp {
echo ==============
echo timestamp : `date`
echo ==============
}
DRUPAL_ROOT=`drush dd`
MODULE_DIR="$DRUPAL_ROOT/sites/all/modules"
MODULE_NAME="ctools_drush_test"
stamp
echo 'Enabling ctools, views, and bulk_export modules.'
drush en ctools views bulk_export --yes
stamp
echo 'Reading all export info'
drush ctools-export-info
stamp
echo 'Reading all export info with format'
drush ctools-export-info --format=json
stamp
echo 'Reading tables only from export info'
drush ctools-export-info --tables-only
stamp
echo 'Reading tables only from export info with format'
drush ctools-export-info --tables-only --format=json
stamp
echo 'Reading all disabled exportables'
drush ctools-export-info --filter=disabled
stamp
echo 'Enabling all default views'
drush ctools-export-enable views_view --yes
stamp
echo 'Reading all enabled exportables'
drush ctools-export-info --filter=enabled
stamp
echo 'Reading all overridden exportables'
drush ctools-export-info --filter=overridden
stamp
echo 'Reading all database only exportables'
drush ctools-export-info --filter=database
stamp
echo 'View all default views export data'
drush ctools-export-view views_view --yes
stamp
echo 'View default "archive" view export data'
drush ctools-export-view views_view archive
stamp
echo 'Disable default "archive" view'
drush ctools-export-disable views_view archive
stamp
echo 'Enable default "archive" view'
drush ctools-export-enable views_view archive
stamp
echo 'Reading all enabled exportables (archive disabled)'
drush ctools-export-info
stamp
echo 'Disabling all default views'
drush ctools-export-disable views_view --yes
stamp
echo 'Revert all default views'
drush ctools-export-revert views_view --yes
stamp
echo 'Enable all node views'
drush ctools-export-enable views_view --module=node --yes
stamp
echo 'Disable all node views'
drush ctools-export-disable views_view --module=node --yes
stamp
echo 'Revert all node views'
drush ctools-export-revert views_view --module=node --yes
stamp
echo 'Revert all exportables'
drush ctools-export-revert --all --yes
stamp
echo 'Enable all exportables'
drush ctools-export-enable --all --yes
stamp
echo 'Disable all exportables'
drush ctools-export-disable --all --yes
stamp
echo 'Bulk export all objects'
drush ctools-export $MODULE_NAME --subdir='tests' --choice=1
stamp
echo 'Show all files in created folder'
ls -lAR "$MODULE_DIR/tests/$MODULE_NAME"
stamp
echo 'Removing exported object files'
rm -Rf $MODULE_DIR/tests