From cae1efd552ed0618b13120e07c346cbe28cbd00a Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 2 Mar 2013 00:36:12 +0100 Subject: Corrections quelques bugs + modif fichier config BDD + ajout fichier build.sh pour générer la lib Minz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 build.sh (limited to 'build.sh') diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..e6c563b83 --- /dev/null +++ b/build.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +MINZ_REPO_URL="https://github.com/marienfressinaud/MINZ.git" +MINZ_CLONE_PATH="./minz_tmp" +LIB_MINZ_PATH="./minz_tmp/lib/*" +LIB_PATH="./lib/minz" +LOG_PATH="./log" +CACHE_PATH="./cache" + +git_check() { + printf "Vérification de la présence de git... " + + EXE_PATH=$(which "git" 2>/dev/null) + if [ $? -ne 0 ]; then + printf "git n'est pas présent sur votre système. Veuillez l'installer avant de continuer\n"; + exit 1 + else + printf "git a été trouvé\n" + fi +} + +dir_check() { + test -d $LOG_PATH + if [ $? -ne 0 ]; then + mkdir $LOG_PATH + fi + + test -d $CACHE_PATH + if [ $? -ne 0 ]; then + mkdir $CACHE_PATH + fi +} + +clone_minz() { + printf "Récupération de Minz...\n" + + git clone $MINZ_REPO_URL $MINZ_CLONE_PATH + test -d $LIB_PATH + if [ $? -ne 0 ]; then + mkdir -p $LIB_PATH + fi + mv $LIB_MINZ_PATH $LIB_PATH + rm -rf $MINZ_CLONE_PATH + + printf "Récupération de Minz terminée...\n" +} + +git_check +dir_check +clone_minz -- cgit v1.2.3