2013-04-24 38 views
1

我有一个bash脚本,当我运行它,我问了一个问题:用Drush安装Drupal制作并安装配置文件并使用bash脚本 - 如何回答yes/no?

“您创建一个网站/默认/文件目录下,并创建一个 网站/默认/ settings.php配置文件拖放在您的“geo_test” 数据库中的所有表。你要继续吗?(Y/N)”

如何回答‘Y’自动?

#!/bin/bash 
cd /Applications/MAMP/htdocs 
#sudo rm -rf geoslate 
drush make distro.make geoslate --working-copy --no-gitinfofile 
cd geoslate 
drush si geoslate --db-url='mysql://root:[email protected]/geo_test' --site-name=Geoslate 

回答

2

添加-y选项应该给它:

drush si geoslate -y --db-url='mysql://root:[email protected]/geo_test' --site-name=Geoslate