]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix RESTOREDIR at hydra_backup_environment_local_website
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 11 Mar 2014 16:43:50 +0000 (13:43 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 11 Mar 2014 16:43:50 +0000 (13:43 -0300)
lib/hydra/backup

index 0fb6e80ce1b371415ee17eda5f645492a7461170..000bc5a27d163efa5fe2d4e9277e54983915a181 100644 (file)
@@ -19,7 +19,7 @@ function hydra_backup_environment_local_website {
 
   # Try to get the newest if there's no backup for the current date
   if [ ! -e "$RESTOREDIR/$SITE.tar.bz2" ]; then
-    RESTOREDIR="$(find $BACKUPDIR -name "$SITE.tar.bz2" | sort -n | tail -n 1)"
+    RESTOREDIR="$(find $BACKUPDIR -name "$SITE.tar.bz2" -exec dirname {} \; | sort -n | tail -n 1)"
 
     if [ -z "$RESTOREDIR" ]; then
       echo "Backup not found for $DATE."