From 67f1773fee7dc7380a7f98d6a22e3ba1a30d2c97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Mon, 6 Jul 2020 09:46:36 +0200
Subject: [PATCH] CI: directly untar the Doxygen documentation into the Doxygen
 directory instead of moving it afterward

---
 CI/deploy.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/CI/deploy.sh b/CI/deploy.sh
index 4c5b4fbe06..f05f5ebd04 100755
--- a/CI/deploy.sh
+++ b/CI/deploy.sh
@@ -86,12 +86,9 @@ then
     mv ${jobs_directory}/CookBook-*/* /home/otbpush/test/CookBook/.
 
   # Doxygen
-  ssh otbpush@otb5-vm2.orfeo-toolbox.org \
-    tar -xf ${jobs_directory}/OTB-Doxygen-*.tar.bz2 -C ${jobs_directory}/
   ssh otbpush@otb5-vm2.orfeo-toolbox.org \
     rm -rf /home/otbpush/test/Doxygen/*
-  # Too many args for mv
+  # Strip first component of the tar (Doxygen/html/...)
   ssh otbpush@otb5-vm2.orfeo-toolbox.org \
-    "cd /home/otbpush/test/latest/html && find . -mindepth 1 \ 
-      -exec mv {} /home/otbpush/test/Doxygen \;"
+    tar -xf ${jobs_directory}/OTB-Doxygen-*.tar.bz2 -C /home/otbpush/test/Doxygen/ --strip-components=1
 fi
-- 
GitLab