/
AegirSetupC.sh.txt
2648 lines (2535 loc) · 94 KB
/
AegirSetupC.sh.txt
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
###----------------------------------------###
###
### Octopus Aegir Installer
###
### Copyright (C) 2010-2017 Omega8.cc
### noc@omega8.cc www.omega8.cc
###
### This program is free software. You can
### redistribute it and/or modify it under
### the terms of the GNU GPL as published by
### the Free Software Foundation, version 2
### or later.
###
### This program is distributed in the hope
### that it will be useful, but WITHOUT ANY
### WARRANTY; without even the implied
### warranty of MERCHANTABILITY or FITNESS
### FOR A PARTICULAR PURPOSE. See the GNU GPL
### for more details.
###
### You should have received a copy of the
### GNU GPL along with this program.
### If not, see http://www.gnu.org/licenses/
###
### Code: https://github.com/omega8cc/boa
###
###----------------------------------------###
###----------------------------------------###
### DON'T EDIT ANYTHING BELOW THIS LINE ###
###----------------------------------------###
###
### Helper variables
###
bldPth="/opt/tmp/boa"
crlGet="-L --max-redirs 10 -k -s --retry 10 --retry-delay 5 -A iCab"
filIncO="octopus.sh.cnf"
gCb="git clone --branch"
gitHub="https://github.com/omega8cc"
gitLab="https://gitlab.com/omega8cc"
libFnc="${bldPth}/lib/functions"
tocIncO="${filIncO}.$1"
vBs="/var/backups"
vSet="vset --always-set"
###
### Panic on missing include
###
panic_exit() {
echo
echo " EXIT: Required lib file not available?"
echo " EXIT: $1"
echo " EXIT: Cannot continue"
echo " EXIT: Bye (0)"
echo
touch /opt/tmp/status-AegirSetupC-FAIL
exit 1
}
###
### Include helper functions
###
if [ -e "${vBs}/${tocIncO}" ]; then
source "${vBs}/${tocIncO}"
tInc="${vBs}/${tocIncO}"
elif [ -e "${vBs}/${filIncO}" ]; then
source "${vBs}/${filIncO}"
tInc="${vBs}/${filIncO}"
else
panic_exit "${tInc}"
fi
###
### Env debugging
###
if [ "${_DEBUG_MODE}" = "YES" ]; then
echo DEBUG AegirSetupC
echo DEBUG AegirSetupC
echo Effective _USER is $1
[ -r "${vBs}/${tocIncO}" ] && echo Effective tocIncO is ${tocIncO}
echo DEBUG AegirSetupC
echo DEBUG AegirSetupC
env
echo DEBUG AegirSetupC
echo DEBUG AegirSetupC
fi
###
### More helper variables
###
urlDev="http://${_USE_MIR}/dev"
urlHmr="http://${_USE_MIR}/versions/master/aegir"
###
### Include shared functions
###
_FL="helper satellite"
for f in ${_FL}; do
[ -r "${libFnc}/${f}.sh.inc" ] || panic_exit "${f}"
source "${libFnc}/${f}.sh.inc"
done
###
### Local variables
###
if [ "${_THIS_DB_HOST}" = "FQDN" ]; then
_THIS_DB_HOST=$(uname -n 2>&1)
fi
_DIST_INSTALL=NO
_STATUS=INIT
_USE_DISTRO_CORE=NO
_LOCAL_STATUS="${_STATUS}"
_ROOT="/data/disk/${_USER}"
_HM_ROOT="${_ROOT}/aegir/distro/${_HM_DISTRO}"
_DISTRO_ROOT="${_ROOT}/distro/${_DISTRO}"
_PREV_HM_ROOT="${_ROOT}/aegir/distro/${_LAST_HMR}"
_D="/data/all"
_SRCDIR="/opt/tmp/files"
_LOG="/var/backups/octopus-${_USER}-${_NOW}.log"
if [ "${_PHP_CLI_VERSION}" = "7.0" ] \
&& [ -x "/opt/php70/bin/php" ]; then
_T_CLI=/opt/php70/bin
elif [ "${_PHP_CLI_VERSION}" = "5.6" ] \
&& [ -x "/opt/php56/bin/php" ]; then
_T_CLI=/opt/php56/bin
elif [ "${_PHP_CLI_VERSION}" = "5.5" ] \
&& [ -x "/opt/php55/bin/php" ]; then
_T_CLI=/opt/php55/bin
elif [ "${_PHP_CLI_VERSION}" = "5.4" ] \
&& [ -x "/opt/php54/bin/php" ]; then
_T_CLI=/opt/php54/bin
elif [ "${_PHP_CLI_VERSION}" = "5.3" ] \
&& [ -x "/opt/php53/bin/php" ]; then
_T_CLI=/opt/php53/bin
fi
if [ -e "/opt/tools/d7.ini" ] \
&& [ -e "/opt/tools/drush/7/drush/drush.php" ]; then
_DRUSHCMD="${_T_CLI}/php /opt/tools/drush/7/drush/drush.php"
else
_DRUSHCMD="${_T_CLI}/php ${_ROOT}/tools/drush/drush.php"
fi
#
if [ "${_PHP_FPM_VERSION}" = "7.0" ] \
&& [ "${_PHP_CLI_VERSION}" = "7.0" ]; then
_D_8_ALLOW=YES
elif [ "${_PHP_FPM_VERSION}" = "5.6" ] \
&& [ "${_PHP_CLI_VERSION}" = "5.6" ]; then
_D_8_ALLOW=YES
elif [ "${_PHP_FPM_VERSION}" = "5.5" ] \
&& [ "${_PHP_CLI_VERSION}" = "5.5" ]; then
_D_8_ALLOW=YES
else
_D_8_ALLOW=NO
fi
#
PATH=${_T_CLI}:/usr/local/bin:/opt/local/bin:/usr/bin:/usr/sbin:/bin:/sbin
SHELL=/bin/bash
#
pthPch="/opt/tmp/boa/aegir/patches"
urlDrp="http://ftp.drupal.org/files/projects"
urlPrt="https://drupal.org/project"
#
noT="not installed"
yOk="installation in progress..."
###---### Functions.
#
# Download and extract from distro.
get_distro_ext() {
if [ ! -z "$1" ]; then
curl ${crlGet} "http://${_USE_MIR}/distro/$1" -o "$1"
extract_archive "$1"
fi
}
#
# Create standard directories.
fix_dirs_files() {
rm -f ./*.txt
rm -f ./modules/*.txt
rm -f ./themes/*.txt
rm -rf ./modules/cookie_cache_bypass
mkdir -p ./sites/default/files
mkdir -p ./cache/{normal,perm}
chmod -R 777 ./cache
if [ -e "./sites/default/default.settings.php" ]; then
cp -af ./sites/default/default.settings.php ./sites/default/settings.php
fi
chmod a+rw ./sites/default/settings.php
chmod a+rwx ./sites/default/files
mkdir -p ./profiles
mkdir -p ./sites/all/{modules,libraries,themes}
rm -f ./core/modules/*.txt
rm -f ./core/themes/*.txt
rm -f ./modules/*.txt
rm -f ./themes/*.txt
rm -f ./sites/all/*.txt
echo empty > ./profiles/EMPTY.txt
echo empty > ./sites/all/EMPTY.txt
echo empty > ./sites/all/modules/EMPTY.txt
echo empty > ./sites/all/libraries/EMPTY.txt
echo empty > ./sites/all/themes/EMPTY.txt
chmod 0755 ./profiles &> /dev/null
chmod 0755 ./sites
chmod 0755 ./sites/all
chmod 02775 ./sites/all/{modules,libraries,themes}
cp -af /opt/tmp/boa/aegir/conf/get.htaccess.txt ./.htaccess
cp -af /opt/tmp/boa/aegir/conf/crossdomain.xml ./
}
#
# Create D6 symlinks.
create_d6_symlinks() {
if [ ! -L "includes" ]; then
ln -sf ${_D6_CORE_DIR}/.htaccess .htaccess
ln -sf ${_D6_CORE_DIR}/boost_stats.php boost_stats.php
ln -sf ${_D6_CORE_DIR}/cron.php cron.php
ln -sf ${_D6_CORE_DIR}/crossdomain.xml crossdomain.xml
ln -sf ${_D6_CORE_DIR}/includes includes
ln -sf ${_D6_CORE_DIR}/index.php index.php
ln -sf ${_D6_CORE_DIR}/install.php install.php
ln -sf ${_D6_CORE_DIR}/js.php js.php
ln -sf ${_D6_CORE_DIR}/misc misc
ln -sf ${_D6_CORE_DIR}/modules modules
ln -sf ${_D6_CORE_DIR}/themes themes
ln -sf ${_D6_CORE_DIR}/update.php update.php
ln -sf ${_D6_CORE_DIR}/xmlrpc.php xmlrpc.php
cp -af ${_D6_CORE_DIR}/sites ./
fi
if [ ! -L "${_OCTO_PLPATH}/profiles" ] && [ -d "${_SHRD_PLPATH}/profiles" ]; then
rm -rf ${_OCTO_PLPATH}/profiles
ln -s ${_SHRD_PLPATH}/profiles ${_OCTO_PLPATH}/profiles
fi
}
#
# Create D7 symlinks.
create_d7_symlinks() {
if [ ! -L "web.config" ]; then
ln -sf ${_D7_CORE_DIR}/.htaccess .htaccess
ln -sf ${_D7_CORE_DIR}/authorize.php authorize.php
ln -sf ${_D7_CORE_DIR}/cron.php cron.php
ln -sf ${_D7_CORE_DIR}/crossdomain.xml crossdomain.xml
ln -sf ${_D7_CORE_DIR}/includes includes
ln -sf ${_D7_CORE_DIR}/index.php index.php
ln -sf ${_D7_CORE_DIR}/install.php install.php
ln -sf ${_D7_CORE_DIR}/js.php js.php
ln -sf ${_D7_CORE_DIR}/misc misc
ln -sf ${_D7_CORE_DIR}/modules modules
ln -sf ${_D7_CORE_DIR}/themes themes
ln -sf ${_D7_CORE_DIR}/update.php update.php
ln -sf ${_D7_CORE_DIR}/web.config web.config
ln -sf ${_D7_CORE_DIR}/xmlrpc.php xmlrpc.php
cp -af ${_D7_CORE_DIR}/sites ./
fi
if [ ! -L "${_OCTO_PLPATH}/profiles" ] && [ -d "${_SHRD_PLPATH}/profiles" ]; then
rm -rf ${_OCTO_PLPATH}/profiles
ln -s ${_SHRD_PLPATH}/profiles ${_OCTO_PLPATH}/profiles
fi
}
#
# Create distro own D7 core symlinks.
create_distro_d7_symlinks() {
if [ ! -L "web.config" ]; then
if [ ! -f "${_SHRD_PLPATH}/crossdomain.xml" ]; then
rm -f ${_SHRD_PLPATH}/crossdomain.xml
cd ${_SHRD_PLPATH}
fix_dirs_files
fi
if [ ! -L "${_SHRD_PLPATH}/modules/o_contrib_seven" ]; then
ln -sf ${_CORE}/o_contrib_seven ${_SHRD_PLPATH}/modules/o_contrib_seven
fi
cd ${_OCTO_PLPATH}
ln -sf ${_SHRD_PLPATH}/.htaccess .htaccess
ln -sf ${_SHRD_PLPATH}/authorize.php authorize.php
ln -sf ${_SHRD_PLPATH}/cron.php cron.php
ln -sf ${_SHRD_PLPATH}/crossdomain.xml crossdomain.xml
ln -sf ${_SHRD_PLPATH}/includes includes
ln -sf ${_SHRD_PLPATH}/index.php index.php
ln -sf ${_SHRD_PLPATH}/install.php install.php
ln -sf ${_CORE}/o_contrib_seven/js/js.php js.php
ln -sf ${_SHRD_PLPATH}/misc misc
ln -sf ${_SHRD_PLPATH}/modules modules
ln -sf ${_SHRD_PLPATH}/themes themes
ln -sf ${_SHRD_PLPATH}/update.php update.php
ln -sf ${_SHRD_PLPATH}/web.config web.config
ln -sf ${_SHRD_PLPATH}/xmlrpc.php xmlrpc.php
cp -af ${_SHRD_PLPATH}/sites ./
fi
if [ ! -L "${_OCTO_PLPATH}/profiles" ] && [ -d "${_SHRD_PLPATH}/profiles" ]; then
rm -rf ${_OCTO_PLPATH}/profiles
ln -s ${_SHRD_PLPATH}/profiles ${_OCTO_PLPATH}/profiles
fi
}
#
# Create D8 symlinks.
create_d8_symlinks() {
if [ ! -L "core" ]; then
ln -sf ${_D8_CORE_DIR}/.csslintrc .csslintrc
ln -sf ${_D8_CORE_DIR}/.editorconfig .editorconfig
ln -sf ${_D8_CORE_DIR}/.eslintignore .eslintignore
ln -sf ${_D8_CORE_DIR}/.eslintrc .eslintrc
ln -sf ${_D8_CORE_DIR}/.gitattributes .gitattributes
ln -sf ${_D8_CORE_DIR}/.htaccess .htaccess
ln -sf ${_D8_CORE_DIR}/autoload.php autoload.php
ln -sf ${_D8_CORE_DIR}/composer.json composer.json
ln -sf ${_D8_CORE_DIR}/core core
ln -sf ${_D8_CORE_DIR}/crossdomain.xml crossdomain.xml
ln -sf ${_D8_CORE_DIR}/example.gitignore example.gitignore
ln -sf ${_D8_CORE_DIR}/index.php index.php
ln -sf ${_D8_CORE_DIR}/modules modules
ln -sf ${_D8_CORE_DIR}/profiles profiles
ln -sf ${_D8_CORE_DIR}/themes themes
ln -sf ${_D8_CORE_DIR}/update.php update.php
ln -sf ${_D8_CORE_DIR}/vendor vendor
ln -sf ${_D8_CORE_DIR}/web.config web.config
cp -af ${_D8_CORE_DIR}/sites ./
fi
if [ ! -L "${_OCTO_PLPATH}/profiles" ] && [ -d "${_SHRD_PLPATH}/profiles" ]; then
rm -rf ${_OCTO_PLPATH}/profiles
ln -s ${_SHRD_PLPATH}/profiles ${_OCTO_PLPATH}/profiles
fi
}
#
# Rename D7 profiles.
rename_drupal7_profiles() {
for Files in `find ./profiles -type f`; do
sed -i "s/name = Minimal/name = Vanilla Minimal/g" $Files &> /dev/null
wait
sed -i "s/name = Standard/name = Vanilla Standard/g" $Files &> /dev/null
wait
sed -i "s/name = Testing/name = Vanilla Testing/g" $Files &> /dev/null
wait
sed -i "s/hidden = TRUE//g" $Files &> /dev/null
wait
done
}
#
# Rename D8 profiles.
rename_drupal8_profiles() {
for Files in `find ./core/profiles -type f`; do
sed -i "s/name: Minimal/name: Vanilla Minimal/g" $Files &> /dev/null
wait
sed -i "s/name: Standard/name: Vanilla Standard/g" $Files &> /dev/null
wait
sed -i "s/name: Testing/name: Vanilla Testing/g" $Files &> /dev/null
wait
done
}
#
# Prepare D6 core.
prepare_drupal6_core() {
if [ ! -e "${_D6_CORE_DIR}" ]; then
if [ -L "${_D6_CORE_DIR}" ]; then
unlink ${_D6_CORE_DIR}
fi
cd /data/all/000/core
curl -L --max-redirs 10 -k -s -A iCab \
"http://${_USE_MIR}/core/pressflow-${_SMALLCORE6}.tar.gz" | tar -xzf -
find ${_D6_CORE_DIR} -type d -exec chmod 0755 {} \; &> /dev/null
find ${_D6_CORE_DIR} -type f -exec chmod 0644 {} \; &> /dev/null
cd ${_D6_CORE_DIR}/
fix_dirs_files
patch -p0 < ${pthPch}/taxonomy-6.26.patch &> /dev/null
rm -f ${_D6_CORE_DIR}/modules/taxonomy/taxonomy.module.orig
rm -f modules/o_contrib
ln -s ${_CORE}/o_contrib modules/o_contrib
ln -s ${_CORE}/o_contrib/js/js.php js.php
cp -af ${_CORE}/o_contrib/image/image.imagemagick.inc includes/
cp -af ${_CORE}/o_contrib/boost/stats/boost_stats.php ./ &> /dev/null
rm -rf ${_D6_CORE_DIR}/scripts
cd ${_D6_CORE_DIR}/themes
get_dev_contrib "rubik-6.x-3.0-beta5.tar.gz"
get_dev_contrib "tao-6.x-3.3.tar.gz"
rm -f ${_D6_CORE_DIR}/sites/all/*.txt
cd ${_CORE}
fi
}
#
# Prepare D7 core.
prepare_drupal7_core() {
if [ ! -e "${_D7_CORE_DIR}" ]; then
if [ -L "${_D7_CORE_DIR}" ]; then
unlink ${_D7_CORE_DIR}
fi
cd /data/all/000/core
curl ${crlGet} \
"http://${_USE_MIR}/core/drupal-${_SMALLCORE7}.tar.gz" \
| tar -xzf -
find ${_D7_CORE_DIR} -type d -exec chmod 0755 {} \; &> /dev/null
find ${_D7_CORE_DIR} -type f -exec chmod 0644 {} \; &> /dev/null
cd ${_D7_CORE_DIR}/
fix_dirs_files
rename_drupal7_profiles
patch -p0 < ${pthPch}/taxonomy-7.12.patch &> /dev/null
rm -f ${_D7_CORE_DIR}/modules/taxonomy/taxonomy.module.orig
rm -f modules/o_contrib_seven
ln -s ${_CORE}/o_contrib_seven modules/o_contrib_seven
ln -s ${_CORE}/o_contrib_seven/js/js.php js.php
rm -rf ${_D7_CORE_DIR}/scripts
cd ${_D7_CORE_DIR}/themes
get_dev_contrib "rubik-7.x-4.4.tar.gz"
get_dev_contrib "tao-7.x-3.1.tar.gz"
cd ${_CORE}
fi
}
#
# Prepare D8 core.
prepare_drupal8_core() {
if [ ! -e "${_D8_CORE_DIR}" ]; then
if [ -L "${_D8_CORE_DIR}" ]; then
unlink ${_D8_CORE_DIR}
fi
cd /data/all/000/core
curl ${crlGet} \
"http://${_USE_MIR}/core/drupal-${_SMALLCORE8}.tar.gz" \
| tar -xzf -
find ${_D8_CORE_DIR} -type d -exec chmod 0755 {} \; &> /dev/null
find ${_D8_CORE_DIR} -type f -exec chmod 0644 {} \; &> /dev/null
cd ${_D8_CORE_DIR}/
patchFile="0001-Symlink-core-support-test.patch"
patch -p1 < ${bldPth}/aegir/patches/8-core/${patchFile} &> /dev/null
fix_dirs_files
rename_drupal8_profiles
rm -f modules/o_contrib_eight
ln -s ${_CORE}/o_contrib_eight modules/o_contrib_eight
cd ${_CORE}
fi
}
#
# Remove D6 core from distro directory.
nocore_d6_dist_clean() {
rm -f ${_SHRD_PLPATH}/.gitignore
rm -f ${_SHRD_PLPATH}/.htaccess
rm -f ${_SHRD_PLPATH}/*.php
rm -f ${_SHRD_PLPATH}/*.txt
rm -f ${_SHRD_PLPATH}/*.xml
rm -rf ${_SHRD_PLPATH}/cache
rm -rf ${_SHRD_PLPATH}/includes
rm -rf ${_SHRD_PLPATH}/misc
rm -rf ${_SHRD_PLPATH}/modules
rm -rf ${_SHRD_PLPATH}/sites
rm -rf ${_SHRD_PLPATH}/scripts
rm -rf ${_SHRD_PLPATH}/themes
if [ ! -d "${_SHRD_PLPATH}/profiles" ] && [ -d "${_D6_CORE_DIR}/profiles" ]; then
rm -rf ${_SHRD_PLPATH}/profiles
cp -af ${_D6_CORE_DIR}/profiles ${_SHRD_PLPATH}/
fi
sed -i "s/'dblog'/'robotstxt', 'path_alias_cache'/g" \
${_SHRD_PRPATH}/${_REAL_PRNAME}.profile &> /dev/null
}
#
# Remove D7 core from distro directory.
nocore_d7_dist_clean() {
if [ "${_USE_DISTRO_CORE}" = "NO" ]; then
rm -f ${_SHRD_PLPATH}/.gitignore
rm -f ${_SHRD_PLPATH}/.htaccess
rm -f ${_SHRD_PLPATH}/*.php
rm -f ${_SHRD_PLPATH}/*.txt
rm -f ${_SHRD_PLPATH}/*.xml
rm -f ${_SHRD_PLPATH}/web.config
rm -rf ${_SHRD_PLPATH}/cache
rm -rf ${_SHRD_PLPATH}/includes
rm -rf ${_SHRD_PLPATH}/misc
rm -rf ${_SHRD_PLPATH}/modules
rm -rf ${_SHRD_PLPATH}/sites
rm -rf ${_SHRD_PLPATH}/scripts
rm -rf ${_SHRD_PLPATH}/themes
_REVISIONS="34 35 36 37 38 39"
for i in $_REVISIONS; do
if [ -d "${_CORE}/drupal-7.$i" ] && [ ! -e "${_SHRD_PLPATH}" ]; then
mv ${_CORE}/drupal-7.$i ${_SHRD_PLPATH}
fi
done
if [ ! -d "${_SHRD_PLPATH}/profiles" ] && [ -d "${_D7_CORE_DIR}/profiles" ]; then
rm -rf ${_SHRD_PLPATH}/profiles
cp -af ${_D7_CORE_DIR}/profiles ${_SHRD_PLPATH}/
fi
fi
}
#
# Remove D8 core from distro directory.
nocore_d8_dist_clean() {
rm -rf ${_SHRD_PLPATH}/cache
rm -rf ${_SHRD_PLPATH}/core
rm -rf ${_SHRD_PLPATH}/includes
rm -rf ${_SHRD_PLPATH}/misc
rm -rf ${_SHRD_PLPATH}/modules
rm -rf ${_SHRD_PLPATH}/scripts
rm -rf ${_SHRD_PLPATH}/sites
rm -rf ${_SHRD_PLPATH}/themes
rm -rf ${_SHRD_PLPATH}/vendor
rm -f ${_SHRD_PLPATH}/.gitignore
rm -f ${_SHRD_PLPATH}/.htaccess
rm -f ${_SHRD_PLPATH}/*.php
rm -f ${_SHRD_PLPATH}/*.txt
rm -f ${_SHRD_PLPATH}/*.xml
rm -f ${_SHRD_PLPATH}/web.config
if [ ! -d "${_SHRD_PLPATH}/profiles" ] && [ -d "${_D8_CORE_DIR}/profiles" ]; then
rm -rf ${_SHRD_PLPATH}/profiles
cp -af ${_D8_CORE_DIR}/profiles ${_SHRD_PLPATH}/
fi
}
#
# Enable D6 admin.
enable_drupal6_admin() {
sed -i "s/'path_alias_cache'/'path_alias_cache', 'admin'/g" \
${_SHRD_PRPATH}/${_REAL_PRNAME}.profile &> /dev/null
}
#
# Remove default core seven profiles.
remove_default_core_seven_profiles() {
rm -rf ${_SHRD_PLPATH}/profiles/minimal
rm -rf ${_SHRD_PLPATH}/profiles/standard
rm -rf ${_SHRD_PLPATH}/profiles/testing
}
#
# Init this distro root.
init_this_distro_root() {
mkdir -p ${_OCTO_PLPATH}
cd ${_OCTO_PLPATH}
if [[ "${_USE_DISTRO_CORE}" = "YES" ]]; then
create_distro_d7_symlinks
else
if [[ "${_SHRD_PLNAME}" =~ "-${_SMALLCORE6}" ]]; then
create_d6_symlinks
elif [[ "${_SHRD_PLNAME}" =~ "-${_SMALLCORE7}" ]]; then
create_d7_symlinks
else
create_d8_symlinks
fi
fi
}
#
# Upgrade contrib less.
upgrade_contrib_less() {
if [ -e "${_SHRD_PRPATH}/modules/contrib/panels" ]; then
rm -rf ${_SHRD_PRPATH}/modules/contrib/panels
cd ${_SHRD_PRPATH}/modules/contrib
get_dev_contrib "panels-7.x-3.8.tar.gz"
if [ ! -e "${_SHRD_PRPATH}/modules/contrib/panels" ]; then
get_dev_contrib "panels-7.x-3.8.tar.gz"
fi
cd ${_CORE}
fi
}
#
# Create D7 basic platform.
create_drupal7_basic() {
if [ ! -d "${_SHRD_PLPATH}" ]; then
mkdir -p ${_SHRD_PLPATH}
if [ ! -e "${_D7_CORE_DIR}" ]; then
prepare_drupal7_core
fi
nocore_d7_dist_clean
fi
init_this_distro_root
}
###---### Checking status.
#
if [ -e "${_ROOT}/log/setupmail.txt" ]; then
_STATUS=UPGRADE
cd ${_ROOT}
fi
###---### User check.
#
if [ "${_DEBUG_MODE}" = "YES" ]; then
msg "${_STATUS} C: Aegir automated install script part C"
fi
if [ `whoami` = "root" ]; then
msg "${_STATUS} C: FATAL ERROR: This script should be ran as a non-root user"
msg "${_STATUS} C: FATAL ERROR: Aborting AegirSetupC installer NOW!"
touch /opt/tmp/status-AegirSetupC-FAIL
exit 1
fi
###---### Hot Sauce check.
#
if [ "${_HOT_SAUCE}" = "NO" ]; then
_CORE="/data/all/${_LAST_ALL}"
_THIS_CORE="${_LAST_ALL}"
if [ "${_USE_CURRENT}" = "YES" ] \
&& [ -e "/data/all/000/core-v-${_SMALLCORE6}.txt" ] \
&& [ -e "/data/all/000/core-v-${_SMALLCORE7}.txt" ]; then
if [ "${_DEBUG_MODE}" = "YES" ]; then
msg "${_STATUS} C: Shared platforms code v.${_LAST_ALL} will be used"
fi
elif [ "${_USE_CURRENT}" = "NO" ] \
|| [ ! -e "/data/all/000/core-v-${_SMALLCORE6}.txt" ] \
|| [ ! -e "/data/all/000/core-v-${_SMALLCORE7}.txt" ]; then
_CORE="/data/all/${_ALL_DISTRO}"
_THIS_CORE="${_ALL_DISTRO}"
msg "${_STATUS} C: Shared platforms code v.${_ALL_DISTRO} (new) will be created"
else
if [ "${_DEBUG_MODE}" = "YES" ]; then
msg "${_STATUS} C: Shared platforms code v.${_LAST_ALL} will be used"
fi
fi
else
_CORE="/data/all/${_ALL_DISTRO}"
_THIS_CORE="${_ALL_DISTRO}"
msg "${_STATUS} C: Shared platforms code v.${_ALL_DISTRO} (new) will be created"
fi
_D6_CORE_DIR="/data/all/000/core/pressflow-${_SMALLCORE6}"
_D7_CORE_DIR="/data/all/000/core/drupal-${_SMALLCORE7}"
_D8_CORE_DIR="/data/all/000/core/drupal-${_SMALLCORE8}"
###---### Distributions full names.
#
_F_AGOV="aGov ${_AGOV} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_CIVICRM_M6="CiviCRM ${_CIVICRM_M6} ${_SMALLCORE6} [${_THIS_CORE}]"
_F_CIVICRM_M7="CiviCRM ${_CIVICRM_M7} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_COD="Conference 1.0-v5 ${_SMALLCORE7} [${_THIS_CORE}]"
_F_COMMERCE1="Commerce ${_COMMERCE1} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_COMMERCE2="Commerce ${_COMMERCE2} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_COMMONS2="Commons ${_COMMONS2} ${_SMALLCORE6} [${_THIS_CORE}]"
_F_COMMONS3="Commons ${_COMMONS3} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_DRUPAL6="Drupal ${_SMALLCORE6} [${_THIS_CORE}]"
_F_DRUPAL7="Drupal ${_SMALLCORE7} [${_THIS_CORE}]"
_F_DRUPAL8="Drupal ${_SMALLCORE8} [${_THIS_CORE}]"
_F_ERPAL="ERPAL ${_ERPAL} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_FSERVER="Feature Server 1.3 ${_SMALLCORE6} [${_THIS_CORE}]"
_F_GUARDR="Guardr ${_GUARDR} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENACADEMY="OpenAcademy ${_OPENACADEMY} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENAID="OpenAid ${_OPENAID} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENATRIUM7="OpenAtrium ${_OPENATRIUM7} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENBLOG="OpenBlog 1.0-v3 ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENCHURCH1="OpenChurch 1.17-b2 ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENCHURCH2="OpenChurch ${_OPENCHURCH2} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENDEALS="OpenDeals ${_OPENDEALS} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENLUCIUS="OpenLucius ${_OPENLUCIUS} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENOUTREACH="OpenOutreach ${_OPENOUTREACH} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENPUBLIC="OpenPublic ${_OPENPUBLIC} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENPUBLISH="OpenPublish 3.0-b7 ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPENSCHOLAR="OpenScholar ${_OPENSCHOLAR} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_OPIGNOLMS="Opigno LMS ${_OPIGNOLMS} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_PANOPOLY="Panopoly ${_PANOPOLY} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_RECRUITER="Recruiter ${_RECRUITER} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_RESTAURANT="Restaurant ${_RESTAURANT} ${_SMALLCORE7} [${_THIS_CORE}]"
_F_UBER_CART_T="Ubercart ${_UBERCART7} [ud2] ${_SMALLCORE7} [${_THIS_CORE}]"
_F_UBERCART6="Ubercart ${_UBERCART6} ${_SMALLCORE6} [${_THIS_CORE}]"
_F_UBERCART7="Ubercart ${_UBERCART7} [aq3] ${_SMALLCORE7} [${_THIS_CORE}]"
#
_F_DRUPAL6_D="Drupal ${_SMALLCORE6} D.${_THIS_CORE}"
_F_DRUPAL6_S="Drupal ${_SMALLCORE6} S.${_THIS_CORE}"
_F_DRUPAL6_P="Drupal ${_SMALLCORE6} P.${_THIS_CORE}"
_F_DRUPAL7_D="Drupal ${_SMALLCORE7} D.${_THIS_CORE}"
_F_DRUPAL7_S="Drupal ${_SMALLCORE7} S.${_THIS_CORE}"
_F_DRUPAL7_P="Drupal ${_SMALLCORE7} P.${_THIS_CORE}"
###---### Create directories.
#
mkdir -p ${_ROOT}/distro/${_THIS_CORE}
chmod 0711 ${_ROOT}/distro &> /dev/null
chmod 0711 ${_ROOT}/distro/${_THIS_CORE} &> /dev/null
###---###
_ALLOW_ALL=YES
if [ "${_CLIENT_CORES}" -lt "1" ]; then
_ALLOW_ALL=NO
_D_8_ALLOW=NO
fi
if [[ "${_VM_TEST}" =~ "3.8.6-beng" ]] \
|| [[ "${_VM_TEST}" =~ "3.8.5.2-beng" ]] \
|| [[ "${_VM_TEST}" =~ "3.8.4-beng" ]] \
|| [[ "${_VM_TEST}" =~ "3.7.5-beng" ]] \
|| [[ "${_VM_TEST}" =~ "3.7.4-beng" ]] \
|| [[ "${_VM_TEST}" =~ "3.6.15-beng" ]] \
|| [[ "${_VM_TEST}" =~ "3.2.16-beng" ]]; then
_VMFAMILY="VS"
if [ ! -e "/data/conf/.d8allow.cnf" ]; then
_D_8_ALLOW=NO
fi
else
_VMFAMILY="XEN"
fi
###---### Prepare D6 and D7 shared core
#
prepare_drupal6_core
prepare_drupal7_core
agov_install() {
###---### aGov
#
_REAL_PRNAME="agov"
_SHRD_PLNAME="${_REAL_PRNAME}-${_AGOV}-${_SMALLCORE7}"
_SHRD_PLPATH="${_CORE}/${_SHRD_PLNAME}"
_SHRD_PRPATH="${_SHRD_PLPATH}/profiles/${_REAL_PRNAME}"
_OCTO_PLPATH="${_ROOT}/distro/${_THIS_CORE}/${_SHRD_PLNAME}"
if [ "${_ALLOW_ALL}" = "YES" ]; then
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "AGV" ]]; then
if [ ! -d "${_OCTO_PLPATH}" ]; then
if prompt_yes_no "$_F_AGOV - ${urlPrt}/agov" ; then
true
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_AGOV ${yOk}"
if [ ! -d "${_SHRD_PLPATH}" ]; then
cd ${_CORE}
if [ "${_AEGIR_VERSION}" = "HEAD" ] \
&& [ "${_T_BUILD}" = "HEAD" ]; then
if [ ! -e "${_D7_CORE_DIR}" ]; then
prepare_drupal7_core
fi
curl ${crlGet} \
"${urlDrp}/${_REAL_PRNAME}-7.x-${_AGOV}-core.tar.gz" \
| tar -xzf -
if [ -d "${_CORE}/${_REAL_PRNAME}-7.x-${_AGOV}" ]; then
mv ${_REAL_PRNAME}-7.x-${_AGOV} ${_SHRD_PLNAME}
fi
nocore_d7_dist_clean
remove_default_core_seven_profiles
sed -i "s/.*entitycache.*//g" \
${_SHRD_PRPATH}/${_REAL_PRNAME}.info &> /dev/null
rm -rf ${_SHRD_PRPATH}/modules/contrib/entitycache
upgrade_contrib_less
else
get_distro_ext "${_SHRD_PLNAME}.tar.gz"
fi
fi
init_this_distro_root
msg "DISTRO: $_F_AGOV installed"
_RUN_VERIFY=YES
else
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_AGOV ${noT}"
fi
fi
fi
fi
}
commerce_7_1_install() {
###---### Commerce 7.x-1.x
#
_REAL_PRNAME="commerce_kickstart"
_VIRT_PRNAME="commerce"
_SHRD_PLNAME="$_VIRT_PRNAME-${_COMMERCE1}-${_SMALLCORE7}"
_SHRD_PLPATH="${_CORE}/${_SHRD_PLNAME}"
_SHRD_PRPATH="${_SHRD_PLPATH}/profiles/${_REAL_PRNAME}"
_OCTO_PLPATH="${_ROOT}/distro/${_THIS_CORE}/${_SHRD_PLNAME}"
if [ "${_ALLOW_ALL}" = "YES" ]; then
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "DCE" ]]; then
if [ ! -d "${_OCTO_PLPATH}" ]; then
if prompt_yes_no "$_F_COMMERCE1 - http://drupalcommerce.org" ; then
true
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMERCE1 ${yOk}"
if [ ! -d "${_SHRD_PLPATH}" ]; then
cd ${_CORE}
if [ "${_AEGIR_VERSION}" = "HEAD" ] \
&& [ "${_T_BUILD}" = "HEAD" ]; then
if [ ! -e "${_D7_CORE_DIR}" ]; then
prepare_drupal7_core
fi
curl ${crlGet} \
"${urlDrp}/${_REAL_PRNAME}-7.x-${_COMMERCE1}-core.tar.gz" \
| tar -xzf -
if [ -d "${_CORE}/commerce-7.x-${_COMMERCE1}" ]; then
mv commerce-7.x-${_COMMERCE1} ${_SHRD_PLNAME}
elif [ -d "${_CORE}/${_REAL_PRNAME}-7.x-${_COMMERCE1}" ]; then
mv ${_REAL_PRNAME}-7.x-${_COMMERCE1} ${_SHRD_PLNAME}
fi
nocore_d7_dist_clean
remove_default_core_seven_profiles
if [ "${_COMMERCE1}" = "1.32" ]; then
cd ${_SHRD_PRPATH}/modules/
rm -rf commerce
get_dev_contrib "commerce-7.x-1.11.tar.gz"
fi
else
get_distro_ext "${_SHRD_PLNAME}.tar.gz"
fi
fi
init_this_distro_root
msg "DISTRO: $_F_COMMERCE1 installed"
_RUN_VERIFY=YES
else
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMERCE1 ${noT}"
fi
fi
fi
fi
}
commerce_7_2_install() {
###---### Commerce 7.x-2.x
#
_REAL_PRNAME="commerce_kickstart"
_VIRT_PRNAME="commerce"
_SHRD_PLNAME="$_VIRT_PRNAME-${_COMMERCE2}-${_SMALLCORE7}"
_SHRD_PLPATH="${_CORE}/${_SHRD_PLNAME}"
_SHRD_PRPATH="${_SHRD_PLPATH}/profiles/${_REAL_PRNAME}"
_OCTO_PLPATH="${_ROOT}/distro/${_THIS_CORE}/${_SHRD_PLNAME}"
if [ "${_ALLOW_ALL}" = "YES" ]; then
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "CME" ]]; then
if [ ! -d "${_OCTO_PLPATH}" ]; then
if prompt_yes_no "$_F_COMMERCE2 - http://drupalcommerce.org" ; then
true
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMERCE2 ${yOk}"
if [ ! -d "${_SHRD_PLPATH}" ]; then
cd ${_CORE}
if [ "${_AEGIR_VERSION}" = "HEAD" ] \
&& [ "${_T_BUILD}" = "HEAD" ]; then
if [ ! -e "${_D7_CORE_DIR}" ]; then
prepare_drupal7_core
fi
curl ${crlGet} \
"${urlDrp}/${_REAL_PRNAME}-7.x-${_COMMERCE2}-core.tar.gz" \
| tar -xzf -
if [ -d "${_CORE}/commerce-7.x-${_COMMERCE2}" ]; then
mv commerce-7.x-${_COMMERCE2} ${_SHRD_PLNAME}
elif [ -d "${_CORE}/${_REAL_PRNAME}-7.x-${_COMMERCE2}" ]; then
mv ${_REAL_PRNAME}-7.x-${_COMMERCE2} ${_SHRD_PLNAME}
fi
nocore_d7_dist_clean
remove_default_core_seven_profiles
if [ "${_COMMERCE2}" = "2.22" ]; then
cd ${_SHRD_PLPATH}
patch -p1 < ${pthPch}/${_REAL_PRNAME}.patch &> /dev/null
fi
else
get_distro_ext "${_SHRD_PLNAME}.tar.gz"
fi
fi
init_this_distro_root
msg "DISTRO: $_F_COMMERCE2 installed"
_RUN_VERIFY=YES
else
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMERCE2 ${noT}"
fi
fi
fi
fi
}
commons_6_install() {
###---### Commons 6.x
#
_REAL_PRNAME="commons"
_SHRD_PLNAME="${_REAL_PRNAME}-${_COMMONS2}-${_SMALLCORE6}"
_SHRD_PLPATH="${_CORE}/${_SHRD_PLNAME}"
_SHRD_PRPATH="${_SHRD_PLPATH}/profiles/${_REAL_PRNAME}"
_OCTO_PLPATH="${_ROOT}/distro/${_THIS_CORE}/${_SHRD_PLNAME}"
if [ "${_ALLOW_ALL}" = "YES" ]; then
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "DCS" ]]; then
if [ ! -d "${_OCTO_PLPATH}/modules/path_alias_cache" ]; then
if prompt_yes_no "$_F_COMMONS2 - http://acquia.com/drupalcommons" ; then
true
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMONS2 ${yOk}"
if [ ! -d "${_SHRD_PLPATH}" ]; then
if [ "${_AEGIR_VERSION}" = "HEAD" ] \
&& [ "${_T_BUILD}" = "HEAD" ]; then
if [ ! -e "${_D6_CORE_DIR}" ]; then
prepare_drupal6_core
fi
cd ${_CORE}
curl ${crlGet} \
"${urlDrp}/${_REAL_PRNAME}-6.x-${_COMMONS2}-core.tar.gz" \
| tar -xzf -
if [ -d "${_CORE}/${_REAL_PRNAME}-6.x-${_COMMONS2}" ]; then
mv ${_CORE}/commons-6.x-${_COMMONS2} ${_SHRD_PLPATH}
fi
if [ -e "${_SHRD_PRPATH}/drupal_commons.profile" ] \
&& [ ! -e "${_SHRD_PRPATH}/${_REAL_PRNAME}.profile" ]; then
mv -f ${_SHRD_PRPATH}/drupal_commons.profile \
${_SHRD_PRPATH}/${_REAL_PRNAME}.profile
fi
find ${_SHRD_PRPATH} -type f -exec sed -i \
"s/drupal_commons/commons/g" {} \; &> /dev/null
rm -rf ${_SHRD_PLPATH}/profiles/default
nocore_d6_dist_clean
if [ "${_COMMONS2}" = "2.21" ]; then
cd ${_SHRD_PRPATH}/modules/contrib
rm -rf flag
get_dev_contrib "flag-6.x-2.1.tar.gz"
fi
else
cd ${_CORE}
get_distro_ext "${_SHRD_PLNAME}.tar.gz"
fi
fi
init_this_distro_root
if [ ! -L "${_OCTO_PLPATH}/sites/all/libraries/getid3" ]; then
mkdir -p ${_OCTO_PLPATH}/sites/all/libraries
ln -sf ${_SHRD_PRPATH}/libraries/getid3 \
${_OCTO_PLPATH}/sites/all/libraries/getid3
fi
msg "DISTRO: $_F_COMMONS2 installed"
_RUN_VERIFY=YES
else
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMONS2 ${noT}"
fi
fi
fi
fi
}
commons_7_install() {
###---### Commons 7.x
#
_REAL_PRNAME="commons"
_SHRD_PLNAME="${_REAL_PRNAME}-${_COMMONS3}-${_SMALLCORE7}"
_SHRD_PLPATH="${_CORE}/${_SHRD_PLNAME}"
_SHRD_PRPATH="${_SHRD_PLPATH}/profiles/${_REAL_PRNAME}"
_OCTO_PLPATH="${_ROOT}/distro/${_THIS_CORE}/${_SHRD_PLNAME}"
if [ "${_ALLOW_ALL}" = "YES" ]; then
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "CS7" ]]; then
if [ ! -d "${_OCTO_PLPATH}" ]; then
if prompt_yes_no "$_F_COMMONS3 - http://acquia.com/drupalcommons" ; then
true
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMONS3 ${yOk}"
if [ ! -d "${_SHRD_PLPATH}" ]; then
cd ${_CORE}
if [ "${_AEGIR_VERSION}" = "HEAD" ] \
&& [ "${_T_BUILD}" = "HEAD" ]; then
if [ ! -e "${_D7_CORE_DIR}" ]; then
prepare_drupal7_core
fi
curl ${crlGet} \
"${urlDrp}/${_REAL_PRNAME}-7.x-${_COMMONS3}-core.tar.gz" \
| tar -xzf -
if [ -d "${_CORE}/${_REAL_PRNAME}-7.x-${_COMMONS3}" ]; then
mv ${_REAL_PRNAME}-7.x-${_COMMONS3} ${_SHRD_PLNAME}
fi
nocore_d7_dist_clean
remove_default_core_seven_profiles
cd ${_SHRD_PRPATH}
patch -p1 < ${pthPch}/commons_chicken_egg.patch &> /dev/null
sed -i "s/.*entitycache.*//g" \
${_SHRD_PRPATH}/${_REAL_PRNAME}.info &> /dev/null
cd ${_SHRD_PRPATH}/modules/contrib/registration
patch -p1 < ${pthPch}/2106995-fatal-error-non-object-1.patch &> /dev/null
rm -rf ${_SHRD_PRPATH}/modules/contrib/entitycache
rm -rf ${_SHRD_PRPATH}/modules/contrib/registry_rebuild
rm -rf ${_SHRD_PRPATH}/modules/contrib/acquia_connector
upgrade_contrib_less
else
get_distro_ext "${_SHRD_PLNAME}.tar.gz"
fi
fi
init_this_distro_root
msg "DISTRO: $_F_COMMONS3 installed"
_RUN_VERIFY=YES
else
[ "${_DEBUG_MODE}" = "YES" ] && msg "DISTRO: $_F_COMMONS3 ${noT}"
fi
fi
fi
fi
}
drupal6_install() {
###---### Drupal 6 Pressflow
#
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "D6D" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "D6S" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "D6P" ]]; then
pthPfw="pressflow-${_SMALLCORE6}-dev/modules/path_alias_cache"
if [ ! -d "${_ROOT}/distro/${_THIS_CORE}/${pthPfw}" ]; then
if prompt_yes_no "$_F_DRUPAL6 - http://pressflow.org" ; then
true
###---### Drupal 6 Pressflow Development
#
_REAL_PRNAME="default"
_VIRT_PRNAME="pressflow"
_SHRD_PLNAME="$_VIRT_PRNAME-${_SMALLCORE6}-dev"
_SHRD_PLPATH="${_CORE}/${_SHRD_PLNAME}"
_SHRD_PRPATH="${_SHRD_PLPATH}/profiles/${_REAL_PRNAME}"
_OCTO_PLPATH="${_ROOT}/distro/${_THIS_CORE}/${_SHRD_PLNAME}"
if [[ "${_PLATFORMS_LIST}" =~ "ALL" ]] \
|| [[ "${_PLATFORMS_LIST}" =~ "D6D" ]]; then