-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclone.sh
More file actions
80 lines (62 loc) · 1.94 KB
/
clone.sh
File metadata and controls
80 lines (62 loc) · 1.94 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
#!/bin/bash
if [ -z "$1" ]
then
echo Usage: sh clone.sh drupal_directory
exit 0
fi
drupal=$1
branch=7.x-1.x
# Core
if [ ! -d "$drupal" ]
then
git clone --recursive -b $branch http://git.drupal.org/project/drupal.git $drupal
if [ ! -d "$drupal" ]; then
echo Drupal directory $drupal does not exist
exit 0
fi
echo "sites/all" >> $drupal/.gitignore
cd $drupal
git add .gitignore
git commit -m 'Updating .gitignore'
cd ..
else
echo Drupal directory $drupal exists.
fi
# Modules
DIR="$( dirname "${BASH_SOURCE[0]}" )"
filecontent=( `cat "$DIR/modules.txt"` )
for module in "${filecontent[@]}"
do
if [ -n "$module" ]
then
if [ -d "$drupal/sites/all/modules/$module" ]
then
echo Module directory $module exists
else
git clone --recursive -b $branch http://git.drupal.org/project/$module.git $drupal/sites/all/modules/$module
fi
fi
done
# Theme
if [ -d "$drupal/sites/all/themes/omega" ]
then
echo Theme directory omega exists
else
git clone --recursive -b $branch http://git.drupal.org/project/omega.git $drupal/sites/all/themes/omega
fi
# Create directory for custom modules
mkdir $drupal/modules/_custom
mkdir $drupal/libraries
# Install files for WYSIWYG to use TinyMCE
unzip ${BASH_SOURCE[0]}/tinymce_3.5.6.zip
mv ${BASH_SOURCE[0]}/tinymce $drupal/libraries
# unzip ${BASH_SOURCE[0]}/tinymce-plugins-codemagic-307f692.zip
unzip ${BASH_SOURCE[0]}/codemagic.zip
mv ${BASH_SOURCE[0]}/codemagic $drupal/libraries/tinymce/jscripts/tiny_mce/plugins
# To prevent using newer version of jQuery at Admin pages
# (Because it does not work on my Chrome)
unzip ${BASH_SOURCE[0]}/jquery_update_custom.zip
mv ${BASH_SOURCE[0]}/jquery_update_custom $drupal/modules/all/_custom
# Copy javascript file for Views Slideshow
mkdir $drupal/sites/all/libraries/jquery.cycle
cp ${BASH_SOURCE[0]}/jquery.cycle.all.js $drupal/sites/all/libraries/jquery.cycle