File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ download() {
22
22
curl -s " $1 " > " $2 " ;
23
23
elif [ ` which wget` ]; then
24
24
wget -nv -O " $2 " " $1 "
25
+ else
26
+ echo " Error: Neither curl nor wget is installed."
27
+ exit 1
28
+ fi
29
+ }
30
+
31
+ # Check if svn is installed
32
+ check_svn_installed () {
33
+ if ! command -v svn > /dev/null; then
34
+ echo " Error: svn is not installed. Please install svn and try again."
35
+ exit 1
25
36
fi
26
37
}
27
38
@@ -64,6 +75,7 @@ install_wp() {
64
75
if [[ $WP_VERSION == ' nightly' || $WP_VERSION == ' trunk' ]]; then
65
76
mkdir -p $TMPDIR /wordpress-trunk
66
77
rm -rf $TMPDIR /wordpress-trunk/*
78
+ check_svn_installed
67
79
svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR /wordpress-trunk/wordpress
68
80
mv $TMPDIR /wordpress-trunk/wordpress/* $WP_CORE_DIR
69
81
else
@@ -108,6 +120,7 @@ install_test_suite() {
108
120
# set up testing suite
109
121
mkdir -p $WP_TESTS_DIR
110
122
rm -rf $WP_TESTS_DIR /{includes,data}
123
+ check_svn_installed
111
124
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/includes/ $WP_TESTS_DIR /includes
112
125
svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/data/ $WP_TESTS_DIR /data
113
126
fi
You can’t perform that action at this time.
0 commit comments