Drupal 11 ready
This commit is contained in:
parent
4d121057d7
commit
5e8e4969df
1 changed files with 48 additions and 54 deletions
|
|
@ -70,7 +70,7 @@ then
|
||||||
PHP="$(php -v | grep PHP | head -n 1 | cut -d'(' -f 1)"
|
PHP="$(php -v | grep PHP | head -n 1 | cut -d'(' -f 1)"
|
||||||
PHP=${PHP:4}
|
PHP=${PHP:4}
|
||||||
PHPVERSION=${PHP::3}
|
PHPVERSION=${PHP::3}
|
||||||
if [[ ! $PHP == 8* ]]
|
if [[ $PHP < 8.3 ]]
|
||||||
then
|
then
|
||||||
OLDPHPVERSION=true
|
OLDPHPVERSION=true
|
||||||
echo ${OLDPHPVERSION}
|
echo ${OLDPHPVERSION}
|
||||||
|
|
@ -85,14 +85,14 @@ if [[ $OLDPHPVERSION ]]
|
||||||
then
|
then
|
||||||
while true; do
|
while true; do
|
||||||
echo
|
echo
|
||||||
echo -e "${RED}Your php version is lower than 8.0, to you want to install php version 8.0 (this is optional)?"
|
echo -e "${RED}Your php version is lower than 8.2. Do you want to install php version 8.3 (this is optional)?"
|
||||||
echo -e "${YELLOW}Please note that if you confirm the app-repo \"ppa:ondrej/php\" will be added to your sources.${NC}"
|
echo -e "${YELLOW}Please note that if you confirm the app-repo \"ppa:ondrej/php\" will be added to your sources.${NC}"
|
||||||
read -p "(y/n): " CURRENTPHPVERSION
|
read -p "(y/n): " CURRENTPHPVERSION
|
||||||
case $CURRENTPHPVERSION in
|
case $CURRENTPHPVERSION in
|
||||||
[Yy]* )
|
[Yy]* )
|
||||||
sudo a2dismod php${PHPVERSION}
|
sudo a2dismod php${PHPVERSION}
|
||||||
PHPVERSION="8.0";
|
PHPVERSION="8.3";
|
||||||
APTS+=( "php8.0" );
|
APTS+=( "php8.3" );
|
||||||
add-apt-repository ppa:ondrej/php -y; break;;
|
add-apt-repository ppa:ondrej/php -y; break;;
|
||||||
[Nn]* ) break;;
|
[Nn]* ) break;;
|
||||||
* ) echo "Please answer y[es] or n[o].";;
|
* ) echo "Please answer y[es] or n[o].";;
|
||||||
|
|
@ -103,25 +103,18 @@ fi
|
||||||
if [[ ${PHP} == "not installed" ]]
|
if [[ ${PHP} == "not installed" ]]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo -e "${YELLOW}Since php is missing on your system, would you like to install version 7.4 or 8.0?"
|
echo -e "${YELLOW}Since php is missing on your system, would you like to install version 8.3?"
|
||||||
echo -e "${RED}The app-repo \"ppa:ondrej/php\" must be added to your sources for this.${NC}"
|
echo -e "${RED}The app-repo \"ppa:ondrej/php\" must be added to your sources for this.${NC}"
|
||||||
echo
|
echo
|
||||||
PS3="I would like to use option... "
|
PS3="I would like to use option... "
|
||||||
options=("8.0" "7.4" "I don't know, please quit.")
|
options=("8.3" "I don't know, please quit.")
|
||||||
select opt in "${options[@]}"
|
select opt in "${options[@]}"
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
"8.0")
|
"8.3")
|
||||||
APTS+=( "php8.0" )
|
APTS+=( "php8.3" )
|
||||||
PHPVERSION="8.0"
|
PHPVERSION="8.3"
|
||||||
echo -e "${GREEN}Will take php8.0.${NC}"
|
echo -e "${GREEN}Will take php8.3.${NC}"
|
||||||
add-apt-repository ppa:ondrej/php -y;
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
"7.4")
|
|
||||||
APTS+=( "php7.4" )
|
|
||||||
PHPVERSION="7.4"
|
|
||||||
echo -e "${GREEN}Will take php7.4.${NC}"
|
|
||||||
add-apt-repository ppa:ondrej/php -y;
|
add-apt-repository ppa:ondrej/php -y;
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|
@ -173,6 +166,7 @@ DEPENDENCIES=(\
|
||||||
"php${PHPVERSION}-mbstring"\
|
"php${PHPVERSION}-mbstring"\
|
||||||
"php${PHPVERSION}-mysql"\
|
"php${PHPVERSION}-mysql"\
|
||||||
"php${PHPVERSION}-xml"\
|
"php${PHPVERSION}-xml"\
|
||||||
|
"php${PHPVERSION}-xsl"\
|
||||||
"php${PHPVERSION}-zip")
|
"php${PHPVERSION}-zip")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue