From dd6f9369c099e6a698049fdf5987a476d6532b69 Mon Sep 17 00:00:00 2001 From: ppound Date: Tue, 9 Dec 2025 13:48:02 -0400 Subject: [PATCH] added parameter support to multiste-drush command --- multisite-drush-command.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multisite-drush-command.bash b/multisite-drush-command.bash index 13f172e..96eb312 100755 --- a/multisite-drush-command.bash +++ b/multisite-drush-command.bash @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# usage ./mulitsite-drush-command.bash path_to_sites_directory command +# usage ./mulitsite-drush-command.bash path_to_sites_directory command "paramters" # path_to_sites_directory is the full path drupals sites directory (something like /var/www/drupal/web/sites) # and command is a drush command #switched to actual directories instead of symlinks as we have multiple symlinks for some production directories #excludes the all and the current directory (.). -[ $# -ne 2 ] && { echo "Usage: $0 path_to_sites_directory drush_command"; exit 1; } +[ $# -lt 2 ] && { echo "Usage: $0 path_to_sites_directory drush_command"; exit 1; } cd "$1" pwd list="$(find ./ -maxdepth 1 -type d)" @@ -13,7 +13,7 @@ for link in $list ; do cd "$link" #pwd echo "Executing Drush command '$2' for site: $link" - ../../../vendor/bin/drush "$2" --yes + ../../../vendor/bin/drush "$2" $3 --yes if [ $? -ne 0 ]; then echo "Error: Drush command failed for site: $site_name" fi