From e7abbfc895a61b3f493504afaa3fc3eb2954e3f2 Mon Sep 17 00:00:00 2001
From: Bruno Nocera Zanette <brunonzanette@gmail.com>
Date: Tue, 2 Sep 2014 20:54:50 -0300
Subject: [PATCH] Split compile script into Install and Recompile

Split compile script into Install and Recompile, to avoid
compilation errors on the first installation.
---
 .../scripts/instala_sistema_essencial.sh      | 24 +++++++++++++++++++
 .../scripts/recompila_sistema_essencial.sh    | 24 +++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100755 participatorio-utils/scripts/instala_sistema_essencial.sh
 create mode 100755 participatorio-utils/scripts/recompila_sistema_essencial.sh

diff --git a/participatorio-utils/scripts/instala_sistema_essencial.sh b/participatorio-utils/scripts/instala_sistema_essencial.sh
new file mode 100755
index 0000000..aecd2d9
--- /dev/null
+++ b/participatorio-utils/scripts/instala_sistema_essencial.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+mvn -Pxpdf-mediafilter-support package -P  \
+				"!dspace-lni,
+                !dspace-sword,
+                !dspace-swordv2,
+                !dspace-rest,
+		!dspace-jspui"
+                
+if [[ $? == 1 ]]; then
+        echo "Aconteceu algum erro durante a compilacao!"
+        exit 1
+fi
+
+(cd dspace/target/dspace-4.1-build && ant fresh-install)
+
+if [[ $? == 1 ]]; then
+        echo "Aconteceu algum erro durante a instalacao"
+        exit 1
+fi
+
+echo "PRONTO"
+
+exit 0
diff --git a/participatorio-utils/scripts/recompila_sistema_essencial.sh b/participatorio-utils/scripts/recompila_sistema_essencial.sh
new file mode 100755
index 0000000..2a0a5fd
--- /dev/null
+++ b/participatorio-utils/scripts/recompila_sistema_essencial.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+mvn -Pxpdf-mediafilter-support package -P  \
+				"!dspace-lni,
+                !dspace-sword,
+                !dspace-swordv2,
+                !dspace-rest,
+		!dspace-jspui"
+                
+if [[ $? == 1 ]]; then
+        echo "Aconteceu algum erro durante a compilacao!"
+        exit 1
+fi
+
+(cd dspace/target/dspace-4.1-build && ant update)
+
+if [[ $? == 1 ]]; then
+        echo "Aconteceu algum erro durante a instalacao"
+        exit 1
+fi
+
+echo "PRONTO"
+
+exit 0
-- 
GitLab