Actualmente en TYPO3 se estan mateniendo la rama 4.5 LTS, 4.6 y 4.7 de este CMS. Si teneis mas de una web y encima teneis que acordaros de que rama usa cada instalacion se os puede poner la neurona un poco al rojo vivo o almenos es lo que me pasa a mi :P

Por ello he escrito un bash script que me soluciona este tema

#!/bin/bash
update_site() {
    local site=$1
    USER=`ls -las /var/www/$site/web/index.php| cut -d " " -f 4`
    GROUP=`ls -las /var/www/$site/web/index.php| cut -d " " -f 5`

    rm -rf /var/www/$site/web/typo3.old
    rm -rf /var/www/$site/web/t3lib.old
    rm -rf /var/www/$site/web/index.php.old
    cp -Rp /var/www/$site/web/typo3 /var/www/$site/web/typo3.old
    cp -Rp /var/www/$site/web/t3lib /var/www/$site/web/t3lib.old
    cp -Rp /var/www/$site/web/index.php /var/www/$site/web/index.php.old
    cp -R /tmp/typo3_src-$VER/* /var/www/$site/web
    chown -R $USER:$GROUP /var/www/$site/web/index.php \
/var/www/$site/web/typo3 /var/www/$site/web/t3lib
}

declare -a T345
declare -a T346
declare -a T347

# Typo3 sites with 4.5 branch
T345[0]="misite45.net"
T345[1]="miotrasiteLTS.com"

# Typo3 sites with 4.6 branch
T346[0]="mi46.com"

# Typo3 sites with 4.7 branch
T347[0]="una47.com"

SRCDIR="/usr/local/src/typo3/"
rm -rf /tmp/typo3*

VER="4.5.22"
tar zxvf $SRCDIR/typo3_src-$VER.tar.gz -C /tmp/

for i in "${T345[@]}"
do
        update_site $i
done

VER="4.6.15"
tar zxvf $SRCDIR/typo3_src-$VER.tar.gz -C /tmp/

for i in "${T346[@]}"
do
        update_site $i
done

VER="4.7.7"
tar zxvf $SRCDIR/typo3_src-$VER.tar.gz -C /tmp/

for i in "${T347[@]}"
do
        update_site $i
done

Ahora "solo" os teneis que preocupar de ir manteniendo los fuentes en /usr/local/src/typo3/

Bon profit!

Tags

  • cms
  • typo3

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
11 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.