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() {
2222 curl -s " $1 " > " $2 " ;
2323 elif [ ` which wget` ]; then
2424 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
2536 fi
2637}
2738
@@ -64,6 +75,7 @@ install_wp() {
6475 if [[ $WP_VERSION == ' nightly' || $WP_VERSION == ' trunk' ]]; then
6576 mkdir -p $TMPDIR /wordpress-trunk
6677 rm -rf $TMPDIR /wordpress-trunk/*
78+ check_svn_installed
6779 svn export --quiet https://core.svn.wordpress.org/trunk $TMPDIR /wordpress-trunk/wordpress
6880 mv $TMPDIR /wordpress-trunk/wordpress/* $WP_CORE_DIR
6981 else
@@ -108,6 +120,7 @@ install_test_suite() {
108120 # set up testing suite
109121 mkdir -p $WP_TESTS_DIR
110122 rm -rf $WP_TESTS_DIR /{includes,data}
123+ check_svn_installed
111124 svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/includes/ $WP_TESTS_DIR /includes
112125 svn export --quiet --ignore-externals https://develop.svn.wordpress.org/${WP_TESTS_TAG} /tests/phpunit/data/ $WP_TESTS_DIR /data
113126 fi
You can’t perform that action at this time.
0 commit comments