Updated drnew (Function to create a new Drupal installation)
This commit is contained in:
parent
dbebd31b82
commit
f903bbd565
@ -46,18 +46,26 @@ function drnew() {
|
|||||||
|
|
||||||
drush dl drupal --drupal-project-rename=$WEBSITE_NAME
|
drush dl drupal --drupal-project-rename=$WEBSITE_NAME
|
||||||
|
|
||||||
echo "Moving to /var/www"
|
echo "Type your localhost directory: (Leave empty for /var/www/html/)"
|
||||||
mv $WEBSITE_NAME /var/www
|
read DIRECTORY
|
||||||
cd /var/www/$WEBSITE_NAME
|
|
||||||
|
if [[ $DIRECTORY == "" ]] then
|
||||||
|
DIRECTORY="/var/www/html/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Moving to $DIRECTORY$WEBSITE_NAME"
|
||||||
|
sudo mv $WEBSITE_NAME $DIRECTORY
|
||||||
|
cd $DIRECTORY$WEBSITE_NAME
|
||||||
|
|
||||||
echo "Database's user: "
|
echo "Database's user: "
|
||||||
read DATABASE_USR
|
read DATABASE_USR
|
||||||
echo "Database's password: "
|
echo "Database's password: "
|
||||||
read -s DATABASE_PWD
|
read -s DATABASE_PWD
|
||||||
echo "Database's name: "
|
echo "Database's name for your project: "
|
||||||
read DATABASE
|
read DATABASE
|
||||||
|
|
||||||
drush site-install standard --db-url="mysql://$DATABASE_USR:$DATABASE_PWD@localhost/$DATABASE" --site-name=$WEBSITE_NAME
|
DB_URL="mysql://$DATABASE_USR:$DATABASE_PWD@localhost/$DATABASE"
|
||||||
|
drush site-install standard --db-url=$DB_URL --site-name=$WEBSITE_NAME
|
||||||
|
|
||||||
open_command $HOST$WEBSITE_NAME
|
open_command $HOST$WEBSITE_NAME
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
Loading…
Reference in New Issue
Block a user