Drupal 11 ready

This commit is contained in:
rnsrk 2024-11-07 08:24:38 +01:00
parent 4d121057d7
commit 5e8e4969df

View file

@ -70,7 +70,7 @@ then
PHP="$(php -v | grep PHP | head -n 1 | cut -d'(' -f 1)"
PHP=${PHP:4}
PHPVERSION=${PHP::3}
if [[ ! $PHP == 8* ]]
if [[ $PHP < 8.3 ]]
then
OLDPHPVERSION=true
echo ${OLDPHPVERSION}
@ -85,14 +85,14 @@ if [[ $OLDPHPVERSION ]]
then
while true; do
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}"
read -p "(y/n): " CURRENTPHPVERSION
case $CURRENTPHPVERSION in
[Yy]* )
sudo a2dismod php${PHPVERSION}
PHPVERSION="8.0";
APTS+=( "php8.0" );
PHPVERSION="8.3";
APTS+=( "php8.3" );
add-apt-repository ppa:ondrej/php -y; break;;
[Nn]* ) break;;
* ) echo "Please answer y[es] or n[o].";;
@ -103,25 +103,18 @@ fi
if [[ ${PHP} == "not installed" ]]
then
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
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[@]}"
do
case $opt in
"8.0")
APTS+=( "php8.0" )
PHPVERSION="8.0"
echo -e "${GREEN}Will take php8.0.${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}"
"8.3")
APTS+=( "php8.3" )
PHPVERSION="8.3"
echo -e "${GREEN}Will take php8.3.${NC}"
add-apt-repository ppa:ondrej/php -y;
break
;;
@ -173,6 +166,7 @@ DEPENDENCIES=(\
"php${PHPVERSION}-mbstring"\
"php${PHPVERSION}-mysql"\
"php${PHPVERSION}-xml"\
"php${PHPVERSION}-xsl"\
"php${PHPVERSION}-zip")