Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # quadrupal7 root
- q7=/path/to/drupal7/sites/;
- q7l=${#q7};
- # drupal 8 root
- d8=/path/to/drupal8/projects/;
- d8l=${#d8};
- act=$d8;
- actl=$d8l;
- if [[ $PWD == ${q7}* ]]; then
- act=$q7;
- actl=$q7l;
- fi
- if [[ $PWD == ${d8}* ]]; then
- act=$d8;
- actl=$d8l;
- fi
- arr=( $(find $act -maxdepth 1 -type d) );
- for i in ${arr[@]}; do
- if [[ $PWD == *${i}* && ${#i} -ge 5 ]]; then
- al=${i:actl};
- if [[ ${#al} -gt 0 ]]; then
- drush @$al $1;
- fi
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement