-
Notifications
You must be signed in to change notification settings - Fork 0
/
part1.sh
executable file
·57 lines (43 loc) · 1.28 KB
/
part1.sh
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
#! /bin/bash
echo "Begin Part 1 - Update core database tables."
echo
echo "Put site into maintenance mode."
drush vset --always-set site_offline 1
echo
echo "Disabling Vertical Response and the PHP input format module."
drush -y dis cookie_cache_bypass php vr
echo
echo "Creating enabled.txt file with enabled modules."
drush pml --no-core --type=module --status=enabled --pipe > enabled.txt
echo
echo "Disabling all the enabled modules."
xargs drush -y dis < enabled.txt
echo
echo "Set the default theme to garland."
drush vset theme_default garland
echo
echo "Switch to the drupal7 branch."
#sudo su gituser -c "git checkout drupal7"
git checkout drupal7
echo
echo "Use sites/default/settings-d7.php for d7 settings.php."
# sudo cp settings-d7.php settings.php
cp settings-d7.php settings.php
echo
echo "Files directory must be 777."
chmod 777 files
echo "Renaming sites/all/modules dir to sites/all/not-modules."
# sudo mv ../all/modules/ ../all/not-modules
mv ../all/modules/ ../all/not-modules
echo
echo "No contributed modules are accessible by drupal at this point."
echo
echo "This next command will conclude Part 1."
echo
echo "Running update.php with verbose debug information printed."
drush updb -vy
echo
echo "Core database tables have been migrated."
echo
echo "[Part 1 Done]"
echo