Added auto-detection of directory name of the new release after extraction
This commit is contained in:
parent
3a840fb501
commit
d958719063
1 changed files with 2 additions and 1 deletions
|
@ -126,6 +126,7 @@ then
|
||||||
then
|
then
|
||||||
[ $DEBUG -eq 1 ] && echo "Extract new release"
|
[ $DEBUG -eq 1 ] && echo "Extract new release"
|
||||||
tar xzf $DOWNLOAD_FILE
|
tar xzf $DOWNLOAD_FILE
|
||||||
|
DOWNLOAD_FILE_DIR=$( tar tzf $DOWNLOAD_FILE 2> /dev/null|head -n1|cut -d'/' -f1 )
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "[WARNING] Le dossier de telechargement n'existe pas ($DOWNLOAD_DIR)."
|
echo "[WARNING] Le dossier de telechargement n'existe pas ($DOWNLOAD_DIR)."
|
||||||
|
@ -136,7 +137,7 @@ then
|
||||||
if [ $UPGRADE -eq 1 ]
|
if [ $UPGRADE -eq 1 ]
|
||||||
then
|
then
|
||||||
cd "$DOWNLOAD_DIR"
|
cd "$DOWNLOAD_DIR"
|
||||||
default_src="$( pwd )/roundcubemail-$newest"
|
default_src="$( pwd )/$DOWNLOAD_FILE_DIR"
|
||||||
src=""
|
src=""
|
||||||
while [ ! -n "$src" ]
|
while [ ! -n "$src" ]
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue