-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscript2.sh
executable file
·73 lines (35 loc) · 1 KB
/
script2.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
wawa=$1;
pluginDir=$1;
mainDir=$2;
composerPhar=$3;
drupalRoot=$4;
cd $pluginDir;
cwd=$(pwd);
if [[ "$pluginDir" = "$cwd" ]]; then
cd $mainDir;
#cp $pluginDir/autoFinalize.sh $mainDir/autoFinalize.sh;
if [[ "$drupalRoot" != "$mainDir/web" ]]; then
rm -rf $drupalRoot/core;
rm -rf $drupalRoot/libraries;
rm -rf $drupalRoot/themes;
#rm -rf $drupalRoot/modules/custom;
rm -rf $drupalRoot/modules;
rm -rf $mainDir/web/sites;
rm -rf $drupalRoot/profiles;
rm $drupalRoot/web.config;
rm $mainDir/options_settings.txt;
chmod 644 $drupalRoot/sites/default/settings.php;
cp -a $drupalRoot/sites/. $mainDir/web/sites/;
#rm -rf $mainDir/vendor;
#rm $mainDir/composer.lock;
rm -rf $drupalRoot/sites;
rm $drupalRoot/update.php;
rm $drupalRoot/index.php;
rm $drupalRoot/autoload.php;
rm $drupalRoot/.htaccess;
rm $drupalRoot/robots.txt;
else
chmod 644 $drupalRoot/sites/default/settings.php;
fi
fi