Benjamin Renard commited on 2011-09-29 08:09:35
Showing 1 changed files, with 2 additions and 1 deletions.
... | ... |
@@ -126,6 +126,7 @@ then |
126 | 126 |
then |
127 | 127 |
[ $DEBUG -eq 1 ] && echo "Extract new release" |
128 | 128 |
tar xzf $DOWNLOAD_FILE |
129 |
+ DOWNLOAD_FILE_DIR=$( tar tzf $DOWNLOAD_FILE 2> /dev/null|head -n1|cut -d'/' -f1 ) |
|
129 | 130 |
fi |
130 | 131 |
else |
131 | 132 |
echo "[WARNING] Le dossier de telechargement n'existe pas ($DOWNLOAD_DIR)." |
... | ... |
@@ -136,7 +137,7 @@ then |
136 | 137 |
if [ $UPGRADE -eq 1 ] |
137 | 138 |
then |
138 | 139 |
cd "$DOWNLOAD_DIR" |
139 |
- default_src="$( pwd )/roundcubemail-$newest" |
|
140 |
+ default_src="$( pwd )/$DOWNLOAD_FILE_DIR" |
|
140 | 141 |
src="" |
141 | 142 |
while [ ! -n "$src" ] |
142 | 143 |
do |
143 | 144 |