From d9587190631d3ba65229a2c5833cfe9402962a0b Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 29 Sep 2011 10:09:35 +0200 Subject: [PATCH] Added auto-detection of directory name of the new release after extraction --- check_rc_upgrade.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check_rc_upgrade.sh b/check_rc_upgrade.sh index 1a4362d..3df1029 100755 --- a/check_rc_upgrade.sh +++ b/check_rc_upgrade.sh @@ -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