From 82acf2e6ee62265dd3bf2f601dc858a78b08a0e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr>
Date: Fri, 13 Apr 2018 11:49:48 +0200
Subject: [PATCH] =?UTF-8?q?Correction=20de=20bug=20de=20d=C3=A9ploiement?=
 =?UTF-8?q?=20des=20liens=20symboliques=20:=20ils=20sont=20maintenant=20re?=
 =?UTF-8?q?latifs=20:=20c'est=20mieux?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 bin/ose                                       |  22 +++++++-----------
 bin/ose-deploy                                |  16 ++++++-------
 "data/D\303\251ploiement/Changements.pdf"     | Bin 169104 -> 169104 bytes
 .../Proc\303\251dure d'installation.pdf"      | Bin 205825 -> 205825 bytes
 ...roc\303\251dure de mise \303\240 jour.pdf" | Bin 162098 -> 162098 bytes
 5 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/bin/ose b/bin/ose
index 237c849794..722291179c 100755
--- a/bin/ose
+++ b/bin/ose
@@ -117,7 +117,6 @@ function update(Console $c, OseAdmin $oa)
 }
 
 
-
 function passwordChange(Console $c, OseAdmin $oa)
 {
     $c->println("Veuillez saisir un login :");
@@ -140,7 +139,6 @@ function passwordChange(Console $c, OseAdmin $oa)
 }
 
 
-
 function majPublicLinks(Console $c, OseAdmin $oa)
 {
     $osedir = dirname(__DIR__);
@@ -149,15 +147,14 @@ function majPublicLinks(Console $c, OseAdmin $oa)
 
     $res = $oa->majUnicaenSymLinks($osedir);
 
-    if ($res){
+    if ($res) {
         $c->println('Liens mis à jour', $c::COLOR_LIGHT_GREEN);
-    }else{
+    } else {
         $c->println('Liens déjà à jour', $c::COLOR_LIGHT_GREEN);
     }
 }
 
 
-
 function help(Console $c, OseAdmin $oa)
 {
     $actions = [
@@ -213,23 +210,20 @@ class OseAdmin
 
 
 
-    public function majUnicaenSymLinks($oseDir ): bool
+    public function majUnicaenSymLinks($oseDir): bool
     {
         if (substr($oseDir, -1) !== '/') {
             $oseDir .= '/';
         }
 
-        $publicDir  = $oseDir . 'public/vendor/unicaen/';
-        $unicaenDir = $oseDir . 'vendor/unicaen/';
-
         $oldLibs = [];
-        $od      = array_filter(glob($publicDir . '*'), 'is_dir');
+        $od      = array_filter(glob($oseDir . 'public/vendor/unicaen/*'), 'is_dir');
         foreach ($od as $dir) {
             $oldLibs[] = basename($dir);
         }
 
         $newLibs = [];
-        $nd      = array_filter(glob($unicaenDir . '*'), 'is_dir');
+        $nd      = array_filter(glob($oseDir . 'vendor/unicaen/*'), 'is_dir');
         foreach ($nd as $dir) {
             if (is_dir($dir . '/public')) {
                 $newLibs[] = basename($dir);
@@ -240,18 +234,18 @@ class OseAdmin
         $createLibs = array_diff($newLibs, $oldLibs);
 
         foreach ($deleteLibs as $lib) {
-            $command = "rm $publicDir$lib";
+            $command = "rm $oseDir"."public/vendor/unicaen/$lib";
             $this->console->print($command);
             $this->console->exec($command);
         }
 
         foreach ($createLibs as $lib) {
-            $command = "ln -sf $unicaenDir$lib/public $publicDir$lib";
+            $command = "cd $oseDir/public/vendor/unicaen;ln -sf ../../../vendor/unicaen/$lib/public $lib";
             $this->console->print($command);
             $this->console->exec($command);
         }
 
-        return ! (empty($deleteLibs) && empty($createLibs));
+        return !(empty($deleteLibs) && empty($createLibs));
     }
 
 
diff --git a/bin/ose-deploy b/bin/ose-deploy
index 0523ba709b..2b85eee834 100644
--- a/bin/ose-deploy
+++ b/bin/ose-deploy
@@ -181,23 +181,20 @@ class OseDeploy
 
 
 
-    public function majUnicaenSymLinks($oseDir ): bool
+    public function majUnicaenSymLinks($oseDir): bool
     {
         if (substr($oseDir, -1) !== '/') {
             $oseDir .= '/';
         }
 
-        $publicDir  = $oseDir . 'public/vendor/unicaen/';
-        $unicaenDir = $oseDir . 'vendor/unicaen/';
-
         $oldLibs = [];
-        $od      = array_filter(glob($publicDir . '*'), 'is_dir');
+        $od      = array_filter(glob($oseDir . 'public/vendor/unicaen/*'), 'is_dir');
         foreach ($od as $dir) {
             $oldLibs[] = basename($dir);
         }
 
         $newLibs = [];
-        $nd      = array_filter(glob($unicaenDir . '*'), 'is_dir');
+        $nd      = array_filter(glob($oseDir . 'vendor/unicaen/*'), 'is_dir');
         foreach ($nd as $dir) {
             if (is_dir($dir . '/public')) {
                 $newLibs[] = basename($dir);
@@ -208,22 +205,23 @@ class OseDeploy
         $createLibs = array_diff($newLibs, $oldLibs);
 
         foreach ($deleteLibs as $lib) {
-            $command = "rm $publicDir$lib";
+            $command = "rm $oseDir"."public/vendor/unicaen/$lib";
             $this->console->print($command);
             $this->console->exec($command);
         }
 
         foreach ($createLibs as $lib) {
-            $command = "ln -sf $unicaenDir$lib/public $publicDir$lib";
+            $command = "cd $oseDir/public/vendor/unicaen;ln -sf ../../../vendor/unicaen/$lib/public $lib";
             $this->console->print($command);
             $this->console->exec($command);
         }
 
-        return ! (empty($deleteLibs) && empty($createLibs));
+        return !(empty($deleteLibs) && empty($createLibs));
     }
 
 
 
+
     public function checkPhpModules(array $modules)
     {
         $len = 60;
diff --git "a/data/D\303\251ploiement/Changements.pdf" "b/data/D\303\251ploiement/Changements.pdf"
index 5f7bd5e24fa8e34a9926683fa038559e8f9aee8a..d83f19de6c9228d8d2c6104bae4b206a95047a18 100644
GIT binary patch
delta 103
zcmbQRl54_Bu7(!IElg+HnM^FFpKE7QWHPbb{;{1Yi`&`A*}&1z)Y8q&z{$+X*~!w}
e&DqSv)YRC*!qnK!+{nyM!G@5M>GLKteF6YUdmS49

delta 103
zcmbQRl54_Bu7(!IElg+HnT*V*pKE7QWHK_}{;{1Yi`&`E*wNI~$<W-$&Dqh-z{Szj
e)Wz7y+0@9)(A?6<$;8A?!G@5M>GLKteF6YQF&zT{

diff --git "a/data/D\303\251ploiement/Proc\303\251dure d'installation.pdf" "b/data/D\303\251ploiement/Proc\303\251dure d'installation.pdf"
index 8c292e380df1463e3d048d0a043c539902ec60a1..175d72b7c181cf80f2aadcedb8a7e7418dff450b 100644
GIT binary patch
delta 110
zcmZoX!P9txr=f+hg=q_Omk^7IrGdrtJ|Sj#Fl+lpA?7c9&c+r-ZU(N#ZjR1whAw8#
hu8yV_7G`d)76um1hQ@}*Ms^A|gp_Q5p~x)B1OSqu9C82v

delta 110
zcmZoX!P9txr=f+hg=q_Omk^7Qxq<ogJ|Sj#Fl+lpA?7c9&Mr<Srsn3B2ChzSX6B|w
hhNhOTCa#Vy<|dAo7H$Sk#&!xegp_Q5p~x)B1OSR69A*Fj

diff --git "a/data/D\303\251ploiement/Proc\303\251dure de mise \303\240 jour.pdf" "b/data/D\303\251ploiement/Proc\303\251dure de mise \303\240 jour.pdf"
index ecda514716944c212047493687fbae4e3d9c596d..b3a7f8be75d20b5ce3067029851a3c5d5427b984 100644
GIT binary patch
delta 101
zcmdn=iF4B@&W0AoElef3OeU7o%W|0%nM^FV&&*|t=5jQ*Ff?{{bTu`zG&Xm2G`2J`
dGqbcXH?%NtGjVmXv{SHgbi=P?x@iT|UjXgG8?68U

delta 101
zcmdn=iF4B@&W0AoElef3Oh)F@%W|0%nT*W0&&*|t=5jQ!a5Z&yH8!+xwRARfHnuRe
dFg9~^GBI~^GI2I@wNtQhbi=P?x@iT|UjX=?90dRX

-- 
GitLab