File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ wputools wpuwoo; # Execute a WPU Woo Import Export Task.
4343EOF
4444
4545
46- if [ -d " ${_SOURCEDIR} extensions" ] && [ " $( ls -A " ${_SOURCEDIR} extensions" ) " ]; then
46+ if [ -d " ${_SOURCEDIR} extensions" ] && [ " $( ls -A " ${_SOURCEDIR} extensions" ) " ] && [ -n " $( find " ${_SOURCEDIR} extensions " -mindepth 1 -type d -print -quit ) " ] ; then
4747 echo " # Extensions"
4848 for dir in " ${_SOURCEDIR} extensions" /* /; do
4949 if [[ -d " $dir " ]]; then
Original file line number Diff line number Diff line change @@ -366,8 +366,9 @@ function wputools_select_multisite(){
366366 local _wputools_sites=($( wputools_get_multisite_urls) );
367367 local _tmp_home_url=" " ;
368368
369- # If an argument named url exists, use it
370369 for arg in " $@ " ; do
370+
371+ # If an argument named url exists, use it
371372 if [[ " $arg " == * -url= * ]]; then
372373
373374 # Clean argument
@@ -382,6 +383,19 @@ function wputools_select_multisite(){
382383 fi
383384 done
384385 fi
386+
387+ # If an argument named blog_id exists, use it
388+ if [[ " $arg " == * -blog_id= * ]]; then
389+ local _tmp_blog_id=" ${arg#* -blog_id=} " ;
390+ if wputools_is_website_id_valid " $_tmp_blog_id " ; then
391+ _HOME_URL=$( _WPCLICOMMAND site list --fields=blog_id,url --format=csv | awk -F' ,' -v id=" $_tmp_blog_id " ' $1==id {print $2}' ) ;
392+ echo " Site URL set to ${_HOME_URL} from argument." ;
393+ return ;
394+ else
395+ echo " The blog_id '$_tmp_blog_id ' is not valid." ;
396+ fi
397+ fi
398+
385399 done
386400
387401
Original file line number Diff line number Diff line change 22
33WPUTools (){
44
5- local _WPUTOOLS_VERSION=' 0.143 .0' ;
5+ local _WPUTOOLS_VERSION=' 0.144 .0' ;
66local _PHP_VERSIONS=(7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5 9.0)
77local _PHP_VERSIONS_OBSOLETES=(7.0 7.1 7.2 7.3 7.4 8.0)
88local _PHP_VERSIONS_ADVANCED=(8.3 8.4 8.5 9.0)
You can’t perform that action at this time.
0 commit comments