/
update_wp.sh
executable file
·50 lines (42 loc) · 1.06 KB
/
update_wp.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
#!/bin/bash
#
# copy Wordpress from staging website - run this before (re-)building container
#
LANG=C
LC_ALL=C
export LANG LC_ALL
RemotePath="websrv.eqar.eu:/sites/staging.eqar.eu/www/"
LocalDest="wordpress/html/"
Plugins="
acf-content-analysis-for-yoast-seo
advanced-custom-fields-pro
authorizer
better-wp-security
classic-editor
contexture-page-security
cookie-notice
duplicate-post
gravityforms
gravityforms-acf-field
infogram
public-post-preview
real-media-library
safe-svg
user-role-editor
timber-library
wordpress-seo
wp-super-cache
wp-sync-db-master
public-post-preview
"
echo ; echo "Updating ${LocalDest}:"
mkdir -p "${LocalDest}assets/plugins"
echo -n " * Core: "
rsync -aiu --delete --exclude="wp-config.php" --exclude="wp-config-sample.php" "${RemotePath}{index.php,wp-*.php,wp-admin,wp-includes}" "${LocalDest}" \
| grep -v '^\.\(d\|f\)' | wc -l
for P in ${Plugins}
do
echo -n " * Plugin $P: "
rsync -aiu --delete "${RemotePath}assets/plugins/${P}" "${LocalDest}assets/plugins/" \
| grep -v '^\.\(d\|f\)' | wc -l
done