Added auto-detection of directory name of the new release after extraction

This commit is contained in:
Benjamin Renard 2011-09-29 10:09:35 +02:00
parent 3a840fb501
commit d958719063

View file

@ -126,6 +126,7 @@ then
then
[ $DEBUG -eq 1 ] && echo "Extract new release"
tar xzf $DOWNLOAD_FILE
DOWNLOAD_FILE_DIR=$( tar tzf $DOWNLOAD_FILE 2> /dev/null|head -n1|cut -d'/' -f1 )
fi
else
echo "[WARNING] Le dossier de telechargement n'existe pas ($DOWNLOAD_DIR)."
@ -136,7 +137,7 @@ then
if [ $UPGRADE -eq 1 ]
then
cd "$DOWNLOAD_DIR"
default_src="$( pwd )/roundcubemail-$newest"
default_src="$( pwd )/$DOWNLOAD_FILE_DIR"
src=""
while [ ! -n "$src" ]
do