Résolution bug $title
This commit is contained in:
@@ -76,7 +76,7 @@ if [ -n "$exist" ]; then
|
||||
# /home/bruno/Sites/wordpress/wp-includes/version.php
|
||||
|
||||
wp_exist="$(dirname $(dirname $exist))"
|
||||
|
||||
|
||||
wp_folder_name=$(echo "$exist" | awk -F "/" '{for (i=1;i<=NF;i++) if ($i=="wp-includes") print $(i-1)}')
|
||||
|
||||
read -p $'\n\033[1;31mWordPress is already installed. Do you really want to erase it ? \033[39m(y/n)\033[0m' choice
|
||||
@@ -124,7 +124,12 @@ db=$(wp db create --path=$path)
|
||||
# Installer WordPress:
|
||||
# Si sh: 1: /usr/sbin/sendmail: not found => ajouter --skip-email
|
||||
|
||||
co=$(wp core install --path=$path --url=$url --title='$title' --admin_user=$admin_user --admin_password=$admin_password --admin_email=$admin_email --skip-email)
|
||||
#OK
|
||||
#co=$(wp core install --path=$path --url=$url --title="echo $title" --admin_user=$admin_user --admin_password=$admin_password --admin_email=$admin_email --skip-email)
|
||||
#Error: Too many positional arguments: WordPress Blog
|
||||
#co=$(wp core install --path=$path --url=$url --title=$title --admin_user=$admin_user --admin_password=$admin_password --admin_email=$admin_email --skip-email)
|
||||
#
|
||||
co=$(wp core install --path=$path --url=$url --title="$title" --admin_user=$admin_user --admin_password=$admin_password --admin_email=$admin_email --skip-email)
|
||||
#if [ $? != 0 ]; then echo "$co"; fi
|
||||
|
||||
# Changement de la structure des liens pour ne conserver que le nom de l'article:
|
||||
@@ -150,6 +155,12 @@ ac=$(wp theme activate --path=$path $default_theme)
|
||||
pl=$(wp plugin install --path=$path $defaults_plugins --activate)
|
||||
#if [ $? != 0 ]; then echo -e "\033[31mErrors log:\033[0m" && echo "$pl\n"; fi
|
||||
|
||||
echo "title= $title"
|
||||
|
||||
echo "1blogname: : $(wp option get blogname --path=$path)"
|
||||
|
||||
#wp option update blogname $title --path=$path
|
||||
|
||||
# Installer les packages:
|
||||
|
||||
for i in $defaults_packages
|
||||
@@ -159,7 +170,7 @@ do
|
||||
#if [ $? != 0 ]; then echo "$pa"; fi
|
||||
else
|
||||
echo "Info: $i already installed !"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Ouvrir le tableau de bord dans un navigateur:
|
||||
@@ -169,5 +180,3 @@ if [ "$admin" = true ]; then
|
||||
echo -e "\n\033[1mOpen wp-admin/ page in browser...\033[0m"
|
||||
wp admin --path=$path
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user