\n <\/td>\n | #!<\/span>\/bin\/bash<\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | #<\/span> test the number of arguments<\/span><\/td>\n <\/tr>\n \n <\/td>\n | if<\/span> [ !<\/span> $#<\/span> ==<\/span> 9 ];<\/span> then<\/span><\/td>\n <\/tr>\n \n <\/td>\n | echo<\/span> \"<\/span>Usage: $0<\/span> project_name path dbname dbuser dbpass url admin_email admin_password theme_slug favorite_plugins_file\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | exit<\/span><\/td>\n <\/tr>\n \n <\/td>\n | fi<\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | #<\/span> directory that will hold the WordPress files and be the document root for your site<\/span><\/td>\n <\/tr>\n \n <\/td>\n | PROJECT_NAME=\"<\/span>$1<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | WP_DIR=\"<\/span>$2<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | DBNAME=\"<\/span>$3<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | DBUSER=\"<\/span>$4<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | DBPASS=\"<\/span>$5<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | WP_URL=\"<\/span>$6<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | ADMIN_EMAIL=\"<\/span>$7<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | ADMIN_PASSWORD=\"<\/span>$8<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | THEME_SLUG=\"<\/span>$9<\/span>\"<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | #<\/span> EDIT DEFAULT VALUES HERE<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${PROJECT_NAME:=<\/span>\"<\/span>wptest\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${WP_DIR:=<\/span>\"<\/span>\/Users\/nuno\/Projects\/\"<\/span><\/span>.$PROJECT_NAME<\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${DBNAME:=<\/span>\"<\/span>$PROJECT_NAME<\/span>\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${DBUSER:=<\/span>\"<\/span>user\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${DBPASS:=<\/span>\"<\/span>pass\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${WP_URL:=<\/span>\"<\/span>$PROJECT_NAME<\/span>.dev\"<\/span><\/span>}<\/span> #<\/span> the url you will use when accessing this on localhost, e.g. http:\/\/wptest.dev\/<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${ADMIN_EMAIL:=<\/span>\"<\/span>email\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${ADMIN_PASSWORD:=<\/span>\"<\/span>pass\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${THEME_SLUG:=<\/span>\"<\/span>$PROJECT_NAME<\/span>\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | :<\/span> ${FILE_FAV_PLUGINS:=<\/span>\"<\/span>favorite-plugins.txt\"<\/span><\/span>}<\/span><\/td>\n <\/tr>\n \n <\/td>\n | \n<\/td>\n <\/tr>\n | \n <\/td>\n | #<\/span> Detect paths<\/span><\/td>\n <\/tr>\n \n <\/td>\n | CAT=$(<\/span>which cat)<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | AWK=$(<\/span>which awk)<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | GREP=$(<\/span>which grep)<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | <\/td>\n <\/tr>\n | \n <\/td>\n | PLUGINS=$(<\/span>$CAT<\/span> $FILE_FAV_PLUGINS<\/span> |<\/span> $GREP<\/span> -v ^#<\/span> )<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | <\/span><\/td>\n <\/tr>\n \n <\/td>\n | mkdir $WP_DIR<\/span>;<\/span> cd<\/span> $WP_DIR<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | <\/span><\/td>\n <\/tr>\n \n <\/td>\n | #<\/span> to-do: check if wp-cli is available<\/span><\/span><\/td>\n <\/tr>\n \n <\/td>\n | wp core download<\/span><\/td>\n <\/tr>\n \n <\/td>\n | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |