Update test.sh

This commit is contained in:
2019-02-03 20:51:14 -06:00
parent 45caa992d0
commit 8002c81a30

13
test.sh
View File

@@ -42,7 +42,18 @@ NEWSITE(){
esac
shift
done
echo " Here: '${NEW_SITE}'"
if [[ ${NEW_SITE} == *","* ]]; then
IFS=,
NEW_SITES=(${NEW_SITE})
unset IFS
MAIN_SITE=${NEW_SITES[0]}
NGINX_SERVERNAME=${NEW_SITE//[,]/ }
else
MAIN_SITE=${NEW_SITE}
NGINX_SERVERNAME=${NEW_SITE}
fi
echo " Here: '${NEW_SITE}' - '${MAIN_SITE}' - '${NGINX_SERVERNAME}'"
}
if [ ${1-x} ]; then
case $1 in