-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcomposer_team_city_links.sh
More file actions
executable file
·71 lines (59 loc) · 1.94 KB
/
Copy pathcomposer_team_city_links.sh
File metadata and controls
executable file
·71 lines (59 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
#!/usr/bin/env bash
thisDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# link wp-tests-config
FILE="${thisDir}/resources/wp-tests-config.php"
if [[ -f "$FILE" ]]; then
ln -sfn "${FILE}" "${thisDir}/wordpress-develop/wp-tests-config.php"
fi
# link plugins directories
DIRS="${thisDir}/plugins/sil/*/"
for d in $DIRS
do
fn=$(basename "$d")
target="${thisDir}/wordpress-develop/src/wp-content/plugins/${fn}"
ln -sfn "${d}" "${target}"
done
DIRS="${thisDir}/plugins/third-party/*/"
for d in $DIRS
do
fn=$(basename "$d")
target="${thisDir}/wordpress-develop/src/wp-content/plugins/${fn}"
ln -sfn "${d}" "${target}"
done
# mu-plugins directory
ln -sfn "${thisDir}/plugins/mu-plugins/" "${thisDir}/wordpress-develop/src/wp-content/mu-plugins"
# link themes directories
DIRS="${thisDir}/themes/*/"
for d in $DIRS
do
fn=$(basename "$d")
target="${thisDir}/wordpress-develop/src/wp-content/themes/${fn}"
ln -sfn "${d}" "${target}"
done
mkdir -p "${thisDir}/shared/upgrade"
mkdir -p "${thisDir}/shared/upgrade-temp-backup"
ln -sfn "${thisDir}/shared/upgrade/" "${thisDir}/wordpress-develop/src/wp-content/upgrade"
ln -sfn "${thisDir}/shared/upgrade-temp-backup/" "${thisDir}/wordpress-develop/src/wp-content/upgrade-temp-backup"
# link files in the web root directory
FILES="${thisDir}/resources/*.*"
for f in $FILES
do
fn=$(basename "$f")
ln -sfn "${f}" "${thisDir}/wordpress-develop/src/${fn}"
done
# copy the SQLite db file
FILE="${thisDir}/wordpress-develop/src/wp-content/plugins/sqlite-database-integration/db.copy"
if [[ -f "$FILE" ]]; then
cp "${FILE}" "${thisDir}/wordpress-develop/src/wp-content/db.php"
fi
# copy additional default localizations
mkdir -p "${thisDir}/wordpress-develop/src/wp-content/languages"
FILES="${thisDir}/localizations/wordpress-base/*.mo"
for f in $FILES
do
fn=$(basename "$f")
target="${thisDir}/wordpress-develop/src/wp-content/languages/${fn}"
if [[ ! -f "$target" ]]; then
cp "$f" "$target"
fi
done