You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
478 B
15 lines
478 B
#!/usr/bin/env bash |
|
# usage ./mulitsite-drush-command.bash path_to_sites_directory command |
|
# path_to_sites_directory is the full path drupals sites directory (something like /var/www/drupal/web/sites) |
|
# and command is a drush command |
|
[ $# -ne 0 ] && { echo "Usage: $0 path_to_sites_directory drush_command"; exit 1; } |
|
cd "$1" |
|
pwd |
|
list="$(find ./ -maxdepth 1 -type l)" |
|
for link in $list ; do |
|
cd "$link" |
|
pwd |
|
../../../vendor/bin/drush "$2" --yes |
|
cd "$1" |
|
done |
|
exit
|
|
|