From: Rafał Długołęcki <kontakt@dlugolecki.net.pl>
Date: Mon, 19 Aug 2013 12:54:14 +0000 (+0200)
Subject: Fixed too long password for mysql. Fixed no enable-drupal target. Fixed no email... 
X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=4ebd6d3a6e1df94f6b8923bac424ecbe9999a31a;p=prj-utils.git

Fixed too long password for mysql. Fixed no enable-drupal target. Fixed no email for drupal installation.
---

diff --git a/prj-site b/prj-site
index 8cb13db..abeae69 100755
--- a/prj-site
+++ b/prj-site
@@ -3,6 +3,8 @@
 op="$1"
 name="$2"
 type="$3"
+sql_user=`expr substr rdlugoleck_$name 1 16`
+sql_password=`pwgen -1 -s 50`
 
-make name=$name type=$type -s -f ~/prj/prj-utils/prj-site-make $op
+make name=$name type=$type sql_user=$sql_user sql_password=$sql_password -s -f ~/prj/prj-utils/prj-site-make $op
 
diff --git a/prj-site-make b/prj-site-make
index d346be7..f100901 100755
--- a/prj-site-make
+++ b/prj-site-make
@@ -1,7 +1,4 @@
-#email="dlugolecki.rafal@gmail.com"
-sql_user = rdlugoleck_${name}
-# this allows me to evaluate pwgen result to value
-$(eval sql_password := $(shell pwgen -1 -s 50))
+email="example@example.com"
 apache_sites = '/etc/apache2/sites-available'
 project_dir = `pwd`/${name}
 host = ${name}
@@ -128,6 +125,8 @@ create-drupal: create-directories
 	cd ${project_dir}/www && drush en seven toolbar shortcut -y
 	cd ${project_dir}/www && drush vset admin_theme seven
 
+enable-drupal:
+
 purge-drupal:
 	echo "> Removing SQL user"
 	sudo mysql --defaults-file=/etc/mysql/debian.cnf -e "DROP USER '${sql_user}'@'localhost';"