Last active
July 14, 2016 15:17
-
-
Save rlnorthcutt/92ce1e98cba960fcdf040e3237a42e34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
skipped=() | |
# Ask user which file to use for aliases, or if to run it straight | |
echo "Which file contains the list of the sites that you want URLs for?" | |
read alias_command | |
if test -f $alias_command; then | |
oldIFS="$IFS" | |
IFS=$'\n' site_list=($(<$alias_command)) | |
IFS="$oldIFS" | |
else | |
echo "No file exists with that name. Please try again." | |
exit | |
fi | |
echo "Checking for URLs" | |
# Loop through all the sites and update RestWS | |
for site_alias in "${site_list[@]}" | |
do | |
echo "The URL for $site_alias is:" | |
echo 'http://'$(drush @$site_alias status | grep "Site URI" | awk '{print $4}') | |
done | |
echo "--------------------" | |
echo "That should do it." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment